Skip to content

Commit dd299ff

Browse files
committed
feat: auto deploy script
1 parent 834435e commit dd299ff

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
branches:
8+
- release
9+
workflow_dispatch:
10+
repository_dispatch:
11+
types:
12+
- buildhook
13+
14+
jobs:
15+
build:
16+
name: Build
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
28+
- uses: pnpm/action-setup@v4
29+
with:
30+
run_install: true
31+
32+
- name: Build project
33+
run: pnpm run build
34+
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./dist

0 commit comments

Comments
 (0)