-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (50 loc) · 1.25 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
54
55
56
57
58
name: Website
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
cancel-previous:
name: Cancel Previous
permissions:
contents: read
actions: write
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Build
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build:
name: Build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/[email protected]
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: 'website/yarn.lock'
- name: Lint
run: make lint-docs
- name: Install Dependencies
working-directory: website/
run: yarn install
- name: Build the Website
working-directory: website/
run: yarn build
- name: Deploy Github Pages (only on main)
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: website/build/