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 : [ main ]
6+ workflow_dispatch :
7+
8+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+ concurrency :
17+ group : " pages"
18+ cancel-in-progress : false
19+
20+ jobs :
21+ build :
22+ runs-on : ubuntu-latest
23+
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v4
27+
28+ - name : Setup Node.js
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : 22.x
32+ cache : ' npm'
33+
34+ - name : Install dependencies
35+ run : npm ci
36+
37+ - name : Run linter
38+ run : npm run lint
39+
40+ - name : Check formatting
41+ run : npm run format:check
42+
43+ - name : Run tests
44+ run : npm run test
45+
46+ - name : Build
47+ run : npm run build
48+
49+ - name : Setup Pages
50+ uses : actions/configure-pages@v5
51+
52+ - name : Upload artifact
53+ uses : actions/upload-pages-artifact@v3
54+ with :
55+ path : ' ./dist'
56+
57+ deploy :
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