-
Notifications
You must be signed in to change notification settings - Fork 14
38 lines (37 loc) · 1.14 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
name: website
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Set Env
run: |
echo "OWNER_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_ENV
echo "CURRENT_VERSION=$(node -p 'require("./lerna.json").version')" >> $GITHUB_ENV
- name: Install
run: yarn install
- name: Build Packages
run: yarn run build
- name: Build
run: npm run website -- --metadataVersion="${CURRENT_VERSION}"
env:
OWNER_NAME: ${{ env.OWNER_NAME }}
REPO_NAME: ${{ env.REPO_NAME }}
CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
working-directory: website/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/dist