Skip to content

Commit 0d66fcd

Browse files
committed
ci: add GitHub Pages deployment workflow
1 parent 07f4e0b commit 0d66fcd

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

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

0 commit comments

Comments
 (0)