-
-
Notifications
You must be signed in to change notification settings - Fork 484
53 lines (45 loc) · 1.26 KB
/
website.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
48
49
50
51
52
53
name: Website
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # 00:00 every day
pull_request:
types: [opened, synchronize]
paths:
- 'website/**'
- '.github/workflows/website.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
website:
name: Deploy Website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: taiki-e/checkout-action@v1
- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
shared-key: 'wasm'
- name: Install pnpm
working-directory: website
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache-dependency-path: ./website/package.json
cache: pnpm
- name: Build
working-directory: website
run: |
pnpm install
pnpm run build
- name: Deploy Website
if: ${{ github.ref_name == 'main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/dist
publish_branch: gh-pages