Skip to content

Commit d9bb34d

Browse files
authored
Create build-web.yaml
1 parent 665dd59 commit d9bb34d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/build-web.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Website
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
name: Build Site
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4.1.1
16+
- uses: actions/setup-node@v4.0.0
17+
with:
18+
node-version: 16
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Run Build
22+
run: dashboard/script/build
23+
- name: Upload GitHub Pages artifact
24+
uses: actions/upload-pages-artifact@v2.0.0
25+
with:
26+
path: dashboard/dist/web
27+
28+
deploy:
29+
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && github.ref == 'refs/heads/main'
30+
name: Deploy to GitHub Pages
31+
runs-on: ubuntu-latest
32+
needs: build
33+
permissions:
34+
pages: write
35+
id-token: write
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v3.0.6
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v2.0.4

0 commit comments

Comments
 (0)