File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed
Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Documentation
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+ # Allow manual triggering
9+ workflow_dispatch :
10+
11+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+ concurrency :
20+ group : ' pages'
21+ cancel-in-progress : false
22+
23+ jobs :
24+ # Build job
25+ build :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v4
30+
31+ - name : Setup Node.js
32+ uses : actions/setup-node@v4
33+ with :
34+ node-version : ' 20'
35+ cache : ' npm'
36+
37+ - name : Install dependencies
38+ run : npm ci
39+
40+ - name : Build library
41+ run : npm run build
42+
43+ - name : Build documentation
44+ run : npm run docs:build
45+
46+ - name : Setup Pages
47+ uses : actions/configure-pages@v4
48+
49+ - name : Upload artifact
50+ uses : actions/upload-pages-artifact@v3
51+ with :
52+ path : ./docs
53+
54+ # Deployment job
55+ deploy :
56+ # Only deploy on main branch pushes (not PRs)
57+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
58+ environment :
59+ name : github-pages
60+ url : ${{ steps.deployment.outputs.page_url }}
61+ runs-on : ubuntu-latest
62+ needs : build
63+ steps :
64+ - name : Deploy to GitHub Pages
65+ id : deployment
66+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments