Skip to content

Commit 7674a30

Browse files
committed
add deploy action
Signed-off-by: Yilun <zyl.skysniper@gmail.com>
1 parent 732a3b9 commit 7674a30

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '18'
19+
cache: 'yarn'
20+
cache-dependency-path: website/yarn.lock
21+
22+
- name: Install dependencies
23+
run: |
24+
cd website
25+
yarn install --frozen-lockfile
26+
27+
- name: Configure Git
28+
run: |
29+
git config --global user.name "github-actions[bot]"
30+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
32+
- name: Deploy to GitHub Pages
33+
run: |
34+
cd website
35+
GIT_USER=github-actions[bot] yarn run publish-gh-pages
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)