Build, test and deploy the site from a workflow on push to main
1 changed file+28−0
.github/workflows/deploy.ymladded+28−0View file
@@ -0,0 +1,28 @@
1+name: Test and deploy site
2+
3+on:
4+ push:
5+ branches: [main]
6+ workflow_dispatch:
7+
8+concurrency:
9+ group: site
10+ cancel-in-progress: true
11+
12+jobs:
13+ deploy:
14+ runs-on: ubuntu-latest
15+ timeout-minutes: 15
16+ steps:
17+ - uses: actions/checkout@v4
18+ - uses: actions/setup-node@v4
19+ with:
20+ node-version: 24
21+ - run: npm ci
22+ - run: npm test
23+ - run: npm run build
24+ - uses: actions/configure-pages@v5
25+ - uses: actions/upload-pages-artifact@v3
26+ with:
27+ path: dist
28+ - uses: actions/deploy-pages@v4