-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (36 loc) · 946 Bytes
/
gh_pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy Github Pages
on:
push:
workflow_dispatch:
workflow_run:
workflows: ['Fetch']
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set Timezone
run: sudo timedatectl set-timezone "Asia/Shanghai"
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: pnpm
- name: Load .env file
uses: xom9ikk/dotenv@v2
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'