Skip to content

Commit e19cce1

Browse files
committed
Add publish workflow
1 parent fdf9834 commit e19cce1

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy progress dashboard to Github Pages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Fetch latest repository
14+
uses: actions/checkout@v4
15+
- name: Using Node 20
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: "yarn"
20+
- name: Setup dependencies
21+
run: |
22+
yarn
23+
- name: Build project
24+
run: |
25+
NODE_ENV=production yarn build
26+
- name: Upload production artifact
27+
uses: actions/upload-pages-artifact@v3
28+
with:
29+
name: github-pages
30+
path: dist
31+
32+
deploy:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
36+
permissions:
37+
pages: write
38+
id-token: write
39+
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
44+
steps:
45+
- name: Publishing production artifact
46+
id: deployment
47+
uses: actions/deploy-pages@v4
48+
with:
49+
artifact_name: github-pages

0 commit comments

Comments
 (0)