-
Notifications
You must be signed in to change notification settings - Fork 8
docs: add Docusaurus documentation website with GitHub Pages deployment #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
0xarcano
wants to merge
12
commits into
main
Choose a base branch
from
docs/api-reference-website-generation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
78d5f33
docs(website): add Docusaurus documentation site with GitHub Pages de…
0xarcano 5ace0c4
docs(website): update organization name and URLs to p0tion-tools
0xarcano 30c67b8
fix: correct build configuration for website package
0xarcano c35b56e
feat(website): configure GitHub Pages deployment workflow
0xarcano 84d7af8
fix(website): build packages before TypeDoc generation in CI
0xarcano 0cdb330
chore: update deploy-docs workflow, frontend config, and lockfile
0xarcano 137d35f
chore(frontend): update eslint config, package.json and lockfile
0xarcano c9e74ac
docs(website): use pnpm in scripts and logo.svg for social image
0xarcano 42b4aa4
docs(website): generate API docs via plugin, simplify scripts
0xarcano ca4612f
chore(docs): remove .gitignore.md and .docusaurus from eslint ignore
0xarcano 44a2d6d
chore(docs): removed useless MD files
0xarcano 79b599f
Update apps/website/docs/contributing.md
0xarcano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: Deploy Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow one concurrent deployment | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Documentation | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@c5ba7f7862a0f64c1b1a05fbac13e0b8e86ba08c # v4 | ||
| with: | ||
| version: 10.24.0 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: "22.17.x" | ||
| cache: "pnpm" | ||
| cache-dependency-path: pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build packages | ||
| run: pnpm run build | ||
|
|
||
| - name: Build website | ||
| run: | | ||
| cd apps/website | ||
| pnpm build | ||
| env: | ||
| NODE_ENV: production | ||
| # Ensure API docs are generated before build | ||
|
|
||
| - name: Upload build artifacts | ||
| uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 | ||
| with: | ||
| path: apps/website/build | ||
|
|
||
| deploy: | ||
| name: Deploy to GitHub Pages | ||
| needs: build | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| # Only deploy on main branch | ||
| if: github.ref == 'refs/heads/main' | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| node_modules | ||
| dist | ||
| build | ||
| apps/website/docs/api/** | ||
| apps/website/.docusaurus/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "trailingComma": "all" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,73 +1,85 @@ | ||
| import js from '@eslint/js'; | ||
| import typescript from '@typescript-eslint/eslint-plugin'; | ||
| import typescriptParser from '@typescript-eslint/parser'; | ||
| import prettier from 'eslint-plugin-prettier'; | ||
| import tsdoc from 'eslint-plugin-tsdoc'; | ||
| import path from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
|
|
||
| import js from "@eslint/js"; | ||
| import { FlatCompat } from "@eslint/eslintrc"; | ||
| import typescript from "@typescript-eslint/eslint-plugin"; | ||
| import typescriptParser from "@typescript-eslint/parser"; | ||
| import prettier from "eslint-plugin-prettier"; | ||
| import react from "eslint-plugin-react"; | ||
| import tsdoc from "eslint-plugin-tsdoc"; | ||
|
|
||
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
| const compat = new FlatCompat({ baseDirectory: __dirname }); | ||
|
|
||
| export default [ | ||
| js.configs.recommended, | ||
| ...compat.extends("next/core-web-vitals"), | ||
| { | ||
| files: ['**/*.{js,ts,tsx,jsx}'], | ||
| files: ["**/*.{js,ts,tsx,jsx}"], | ||
| languageOptions: { | ||
| parser: typescriptParser, | ||
| parserOptions: { | ||
| ecmaVersion: 2020, | ||
| sourceType: 'module', | ||
| sourceType: "module", | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
| }, | ||
| globals: { | ||
| // React globals | ||
| React: 'readonly', | ||
| JSX: 'readonly', | ||
| React: "readonly", | ||
| JSX: "readonly", | ||
| // Web APIs | ||
| fetch: 'readonly', | ||
| URLSearchParams: 'readonly', | ||
| URL: 'readonly', | ||
| window: 'readonly', | ||
| document: 'readonly', | ||
| fetch: "readonly", | ||
| URLSearchParams: "readonly", | ||
| URL: "readonly", | ||
| window: "readonly", | ||
| document: "readonly", | ||
| // Node.js globals (for Next.js) | ||
| process: 'readonly', | ||
| console: 'readonly', | ||
| Buffer: 'readonly', | ||
| process: "readonly", | ||
| console: "readonly", | ||
| Buffer: "readonly", | ||
| }, | ||
| }, | ||
| plugins: { | ||
| '@typescript-eslint': typescript, | ||
| "@typescript-eslint": typescript, | ||
| prettier: prettier, | ||
| react: react, | ||
| tsdoc: tsdoc, | ||
| }, | ||
| rules: { | ||
| ...typescript.configs.recommended.rules, | ||
| 'prettier/prettier': [ | ||
| 'error', | ||
| "prettier/prettier": [ | ||
| "error", | ||
| { | ||
| singleQuote: false, | ||
| semi: true, | ||
| tabWidth: 2, | ||
| printWidth: 80, | ||
| trailingComma: 'es5', | ||
| trailingComma: "es5", | ||
| singleAttributePerLine: true, | ||
| }, | ||
| ], | ||
| 'tsdoc/syntax': 'error', | ||
| 'react/jsx-max-props-per-line': [1, { maximum: 1 }], | ||
| 'react/jsx-first-prop-new-line': [1, 'multiline'], | ||
| "tsdoc/syntax": "warn", | ||
| "react/jsx-max-props-per-line": [1, { maximum: 1 }], | ||
0xarcano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "react/jsx-first-prop-new-line": [1, "multiline"], | ||
| // Allow unused vars that start with underscore | ||
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
| "@typescript-eslint/no-unused-vars": [ | ||
| "error", | ||
| { argsIgnorePattern: "^_" }, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| ignores: [ | ||
| 'node_modules/**', | ||
| '.next/**', | ||
| 'out/**', | ||
| 'build/**', | ||
| 'dist/**', | ||
| 'coverage/**', | ||
| '*.min.js', | ||
| "node_modules/**", | ||
| ".next/**", | ||
| "out/**", | ||
| "build/**", | ||
| "dist/**", | ||
| "coverage/**", | ||
| "*.min.js", | ||
| ], | ||
| }, | ||
| ]; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Dependencies | ||
| /node_modules | ||
|
|
||
| # Production | ||
| /build | ||
|
|
||
| # Generated files | ||
| .docusaurus | ||
| .cache-loader | ||
|
|
||
| # Misc | ||
| .DS_Store | ||
| .env.local | ||
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
|
|
||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # TypeDoc generated docs (these should be regenerated on build) | ||
| /docs/api |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.