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 to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+
11+ defaults :
12+ run :
13+ working-directory : docs
14+
15+ jobs :
16+ deploy :
17+ name : Deploy to GitHub Pages
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+
24+ - uses : actions/setup-node@v4
25+ with :
26+ node-version : 20
27+ cache : npm
28+ cache-dependency-path : docs/package-lock.json
29+
30+ - name : Install dependencies
31+ run : npm ci
32+
33+ - name : Build website
34+ run : npm run build
35+
36+ - name : Deploy to GitHub Pages
37+ uses : peaceiris/actions-gh-pages@v4
38+ with :
39+ github_token : ${{ secrets.GITHUB_TOKEN }}
40+ publish_dir : docs/build
41+ commit_message : " Deploy website"
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+
8+ defaults :
9+ run :
10+ working-directory : docs
11+
12+ jobs :
13+ test-deploy :
14+ name : Test deployment
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - uses : actions/setup-node@v4
22+ with :
23+ node-version : 20
24+ cache : npm
25+ cache-dependency-path : docs/package-lock.json
26+
27+ - name : Install dependencies
28+ run : npm ci
29+
30+ - name : Test build website
31+ run : npm run build
You can’t perform that action at this time.
0 commit comments