1+ name : Deploy Docs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ # Review gh actions docs if you want to further define triggers, paths, etc
8+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+ # Ensure we avoid any race conditions with rapid pushes to main
11+ concurrency :
12+ group : " Deploy to GitHub Pages"
13+ cancel-in-progress : true
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ build :
20+ name : Build Docusaurus
21+ runs-on : ubuntu-latest
22+ steps :
23+ - uses : actions/checkout@v6
24+ with :
25+ persist-credentials : false
26+ fetch-depth : 0
27+ - name : Use Node.js
28+ uses : actions/setup-node@v6
29+ with :
30+ node-version-file : " .node-version"
31+ - name : restore node_modules
32+ uses : actions/cache@v4
33+ with :
34+ path : |
35+ packages/node_modules
36+ key : ${{ runner.os }}-${{ hashFiles('packages/yarn.lock') }}
37+ - name : Prepare Environment
38+ run : |
39+ corepack enable
40+
41+ cd packages
42+ yarn config set cacheFolder /home/runner/publish-docs-cache
43+ yarn install
44+ yarn build:all
45+ env :
46+ CI : true
47+ - name : Run docusaurus
48+ run : |
49+ cd packages/documentation
50+ yarn docs:build
51+ env :
52+ CI : true
53+ - name : Run typedoc
54+ run : |
55+ cd packages
56+ yarn docs:typedoc
57+ cp docs documentation/build/typedoc -R
58+ env :
59+ CI : true
60+
61+ - name : Upload Build Artifact
62+ uses : actions/upload-pages-artifact@v4
63+ with :
64+ path : packages/documentation/build
65+
66+ deploy :
67+ name : Deploy to GitHub Pages
68+ needs : build
69+
70+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
71+ permissions :
72+ pages : write # to deploy to Pages
73+ id-token : write # to verify the deployment originates from an appropriate source
74+
75+ # Deploy to the github-pages environment
76+ environment :
77+ name : github-pages
78+ url : ${{ steps.deployment.outputs.page_url }}
79+
80+ runs-on : ubuntu-latest
81+ steps :
82+ - name : Deploy to GitHub Pages
83+ id : deployment
84+ uses : actions/deploy-pages@v4
0 commit comments