-
Notifications
You must be signed in to change notification settings - Fork 3.3k
50 lines (42 loc) · 1.2 KB
/
Copy pathgitbook-pages.yml
File metadata and controls
50 lines (42 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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@v5
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Install deps
run: npm install --no-audit --no-fund
- 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 }}"