Skip to content

Commit 6297e80

Browse files
committed
ci: add GitHub Actions workflow to build & deploy to gh-pages
1 parent 9771ea4 commit 6297e80

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.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+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20"
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build (static export)
29+
run: npm run build
30+
31+
- name: Deploy to gh-pages
32+
uses: peaceiris/actions-gh-pages@v4
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./out

0 commit comments

Comments
 (0)