Skip to content

Commit

Permalink
chore(repo): add docs repo to taiko mono (taikoxyz#17121)
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx authored May 13, 2024
1 parent c7f3143 commit c0b4769
Show file tree
Hide file tree
Showing 78 changed files with 5,645 additions and 183 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docs-site--preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docs Site Preview

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS_SITE }}

on:
push:
branches-ignore:
- main
- release-please-*
paths:
- "packages/docs-site/**"

jobs:
deploy-docs-site-preview:
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/docs-site--production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docs Site Production

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS_SITE }}

on:
push:
tags:
- "docs-site-*"

jobs:
deploy-docs-site-production:
runs-on: [taiko-runner]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
main
deps
deps-dev
docs-site
blobstorage
branding
bridge-ui
Expand Down
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"packages/blobstorage": "0.1.0",
"packages/branding": "0.3.0",
"packages/bridge-ui": "4.2.0",
"packages/docs-site": "1.0.0",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.4.0",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
21 changes: 21 additions & 0 deletions packages/docs-site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
2 changes: 2 additions & 0 deletions packages/docs-site/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore all mdx files
*.mdx
1 change: 1 addition & 0 deletions packages/docs-site/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 4 additions & 0 deletions packages/docs-site/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions packages/docs-site/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
21 changes: 21 additions & 0 deletions packages/docs-site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)

# Taiko docs

Welcome to Taiko docs!

## Repo architecture

Here we will list the important folders within this repo.

### src/content

This is where we store all of the content.

### src/content/config.ts

This is where we extend the `docsSchema`.

## Contributing

View CONTRIBUTING.md inside of the [Taiko monorepo](https://github.com/taikoxyz/taiko-mono/blob/main/CONTRIBUTING.md).
129 changes: 129 additions & 0 deletions packages/docs-site/astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from "starlight-links-validator";

// https://astro.build/config
export default defineConfig({
site: "https://docs.taiko.xyz",
server: {
host: true,
},
redirects: {
"/": "/start-here/getting-started",
},
integrations: [
starlight({
plugins: [starlightLinksValidator()],
components: {
SiteTitle: "./src/components/starlight/SiteTitle.astro",
Head: "./src/components/starlight/Head.astro",
},
title: "Docs",
editLink: {
baseUrl: "https://github.com/taikoxyz/docs/edit/main/",
},
customCss: ["./src/styles/custom.css"],
logo: {
dark: "./src/assets/logo-dark.svg",
light: "./src/assets/logo-light.svg",
},
social: {
github: "https://github.com/taikoxyz",
"x.com": "https://x.com/taikoxyz",
discord: "https://discord.gg/taikoxyz",
youtube: "https://youtube.com/@taikoxyz",
},
sidebar: [
{
label: "Start Here",
items: [
{ label: "Getting started", link: "/start-here/getting-started/" },
{ label: "Contributing", link: "/start-here/contributing/" },
{ label: "Getting support", link: "/start-here/getting-support" },
],
},
{
label: "Core Concepts",
items: [
{ label: "What is Taiko?", link: "/core-concepts/what-is-taiko/" },
{
label: "Based sequencing",
link: "/core-concepts/based-sequencing/",
},
{
label: "Contestable rollups",
link: "/core-concepts/contestable-rollups/",
},
{
label: "Booster rollups",
link: "/core-concepts/booster-rollups/",
},
{ label: "Multi-proofs", link: "/core-concepts/multi-proofs/" },
{
label: "Taiko nodes",
link: "/core-concepts/taiko-nodes/",
},
{
label: "Bridging",
link: "/core-concepts/bridging/",
},
{
label: "Inception layers",
link: "/core-concepts/inception-layers/",
},
],
},
{
label: "Guides",
items: [
{
label: "Set up your wallet",
link: "/guides/set-up-your-wallet/",
},
{ label: "Receive tokens", link: "/guides/receive-tokens/" },
{ label: "Bridge tokens", link: "/guides/bridge-tokens/" },
{ label: "Swap tokens", link: "/guides/swap-tokens/" },
{ label: "Deploy a contract", link: "/guides/deploy-a-contract/" },
{ label: "Verify a contract", link: "/guides/verify-a-contract/" },
{
label: "Run a Holesky node",
link: "/guides/run-a-holesky-node/",
},
{ label: "Run a Taiko node", link: "/guides/run-a-taiko-node/" },
{ label: "Enable a proposer", link: "/guides/enable-a-proposer/" },
{ label: "Enable a prover", link: "/guides/enable-a-prover/" },
],
},
{
label: "Network Reference",
items: [
{
label: "Addresses",
link: "/network-reference/addresses",
},
{
label: "Differences from Ethereum",
link: "/network-reference/differences-from-ethereum",
},
{
label: "Network configuration",
link: "/network-reference/network-configuration",
},
{
label: "RPC configuration",
link: "/network-reference/rpc-configuration",
},
],
},
{
label: "API Reference",
autogenerate: { directory: "api-reference" },
},
{
label: "Resources",
autogenerate: { directory: "resources" },
},
],
}),
],
});
22 changes: 22 additions & 0 deletions packages/docs-site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "docs-site",
"type": "module",
"version": "1.0.0",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.6.0",
"@astrojs/starlight": "^0.22.2",
"astro": "^4.7.1",
"astro-og-canvas": "^0.4.2",
"canvaskit-wasm": "^0.39.1",
"sharp": "^0.33.3",
"starlight-links-validator": "^0.6.0",
"typescript": "^5.4.3"
}
}
3 changes: 3 additions & 0 deletions packages/docs-site/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
13 changes: 13 additions & 0 deletions packages/docs-site/src/assets/docs-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c0b4769

Please sign in to comment.