File tree Expand file tree Collapse file tree 2 files changed +87
-0
lines changed
Expand file tree Collapse file tree 2 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy 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+ defaults :
11+ run :
12+ working-directory : ./website
13+
14+ jobs :
15+ build :
16+ name : Build Docusaurus
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+ - uses : actions/setup-node@v4
23+ with :
24+ node-version : 20
25+ # cache: yarn
26+
27+ - name : Install dependencies
28+ run : yarn install --frozen-lockfile
29+ - name : Build website
30+ run : yarn build
31+
32+ - name : Upload Build Artifact
33+ uses : actions/upload-pages-artifact@v3
34+ with :
35+ path : website/build
36+
37+ deploy :
38+ name : Deploy to GitHub Pages
39+ needs : build
40+
41+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
42+ permissions :
43+ pages : write # to deploy to Pages
44+ id-token : write # to verify the deployment originates from an appropriate source
45+
46+ # Deploy to the github-pages environment
47+ environment :
48+ name : github-pages
49+ url : ${{ steps.deployment.outputs.page_url }}
50+
51+ runs-on : ubuntu-latest
52+ steps :
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v4
56+
Original file line number Diff line number Diff line change 1+ name : Test deployment
2+
3+ on :
4+ pull_request :
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+ defaults :
11+ run :
12+ working-directory : ./website
13+
14+ jobs :
15+ test-deploy :
16+ name : Test deployment
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+ - uses : actions/setup-node@v4
23+ with :
24+ node-version : 20
25+ # cache: yarn
26+
27+ - name : Install dependencies
28+ run : yarn install --frozen-lockfile
29+ - name : Test build website
30+ run : yarn build
31+
You can’t perform that action at this time.
0 commit comments