File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Docs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main # Trigger on push to main branch
7+ paths :
8+ - ' docs-site/**' # Only when docs-site changes
9+ - ' .github/workflows/deploy-docs.yml'
10+ workflow_dispatch : # Allow manual trigger
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+ permissions :
14+ contents : read
15+ pages : write
16+ id-token : write
17+
18+ # Allow only one concurrent deployment
19+ concurrency :
20+ group : " pages"
21+ cancel-in-progress : false
22+
23+ jobs :
24+ build :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v4
29+
30+ - name : Setup Node.js
31+ uses : actions/setup-node@v4
32+ with :
33+ node-version : ' 18'
34+ cache : ' npm'
35+ cache-dependency-path : docs-site/package-lock.json
36+
37+ - name : Install dependencies
38+ working-directory : ./docs-site
39+ run : npm ci
40+
41+ - name : Build docs
42+ working-directory : ./docs-site
43+ env :
44+ GITHUB_PAGES : ' true'
45+ run : npm run build
46+
47+ - name : Setup Pages
48+ uses : actions/configure-pages@v4
49+
50+ - name : Upload artifact
51+ uses : actions/upload-pages-artifact@v3
52+ with :
53+ path : ' ./docs-site/dist'
54+
55+ deploy :
56+ environment :
57+ name : github-pages
58+ url : ${{ steps.deployment.outputs.page_url }}
59+ runs-on : ubuntu-latest
60+ needs : build
61+ steps :
62+ - name : Deploy to GitHub Pages
63+ id : deployment
64+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments