Skip to content

Commit f485c73

Browse files
committed
ci: add GitHub Pages deploy workflow
1 parent 222f5fd commit f485c73

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy demo to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: npm
29+
30+
- run: npm ci
31+
- run: npm run build
32+
33+
- name: Prepare pages
34+
run: |
35+
mkdir _site
36+
cp demo.html _site/index.html
37+
cp -r dist _site/dist
38+
39+
- uses: actions/configure-pages@v5
40+
41+
- uses: actions/upload-pages-artifact@v3
42+
43+
- id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)