Feat : Gitbook
This commit is contained in:
parent
7ad538bcf2
commit
fd92af77a0
124 changed files with 34154 additions and 4 deletions
52
.github/workflows/gitbook-pages.yml
vendored
Normal file
52
.github/workflows/gitbook-pages.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
name: Deploy GitBook to 9router.github.io
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "gitbook/**"
|
||||
- ".github/workflows/gitbook-pages.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: gitbook-pages
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: gitbook
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: gitbook/package-lock.json
|
||||
|
||||
- name: Install deps
|
||||
run: npm ci || npm install
|
||||
|
||||
- name: Build static export
|
||||
run: npm run build
|
||||
env:
|
||||
NODE_ENV: production
|
||||
NEXT_PUBLIC_BASE_PATH: ""
|
||||
|
||||
- name: Add .nojekyll
|
||||
run: touch out/.nojekyll
|
||||
|
||||
- name: Deploy to 9router.github.io
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}
|
||||
external_repository: 9router/9router.github.io
|
||||
publish_branch: main
|
||||
publish_dir: gitbook/out
|
||||
force_orphan: true
|
||||
user_name: github-actions[bot]
|
||||
user_email: github-actions[bot]@users.noreply.github.com
|
||||
commit_message: "deploy: ${{ github.sha }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue