/ proof-of-concept / phase-perception-2
Sign in
proof-of-concept / phase-perception-2
Add site build and deploy workflow
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 73e0691a966c parent 5fe383d Browse files
1 changed file+53−0
.github/workflows/deploy.ymladded+53−0View file
@@ -0,0 +1,53 @@
1+name: Build and deploy site
2+
3+on:
4+ push:
5+ branches:
6+ - main
7+ workflow_dispatch:
8+
9+permissions:
10+ contents: read
11+ pages: write
12+ id-token: write
13+
14+concurrency:
15+ group: "pages"
16+ cancel-in-progress: false
17+
18+jobs:
19+ build:
20+ runs-on: ubuntu-latest
21+ steps:
22+ - name: Checkout
23+ uses: actions/checkout@v4
24+
25+ - name: Setup Node
26+ uses: actions/setup-node@v4
27+ with:
28+ node-version: '22'
29+
30+ - name: Install dependencies
31+ run: npm ci
32+
33+ - name: Lint
34+ run: npm run lint
35+
36+ - name: Build
37+ run: npm run build
38+
39+ - name: Upload artifact
40+ uses: actions/upload-pages-artifact@v3
41+ with:
42+ path: ./dist
43+
44+ deploy:
45+ environment:
46+ name: github-pages
47+ url: ${{ steps.deployment.outputs.page_url }}
48+ runs-on: ubuntu-latest
49+ needs: build
50+ steps:
51+ - name: Deploy site
52+ id: deployment
53+ uses: actions/deploy-pages@v4
↑↓ move↵openescclose