-
Notifications
You must be signed in to change notification settings - Fork 22
33 lines (32 loc) · 848 Bytes
/
website.yml
File metadata and controls
33 lines (32 loc) · 848 Bytes
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
name: website
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set Env
run: |
echo "CURRENT_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV
- name: Install
run: yarn install
- name: Build
run: |
yarn install
npm run website -- --metadataVersion="${CURRENT_VERSION}"
env:
CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
working-directory: example/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/dist