-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (42 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
39
40
41
42
43
44
45
46
47
48
49
name: Website
on:
push:
branches:
- master
paths:
- .github/workflows/website.yml
- website/**
- package.json
- yarn.lock
pull_request:
branches:
- master
defaults:
run:
working-directory: website
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout Repo
uses: actions/checkout@v4
- name: ⬢ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
cache: yarn
- name: 📦 Install Packages
run: yarn install --frozen-lockfile
- name: 🌐 Build Website
run: yarn build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: ⬆️ Deploy to GitHub Pages
# Deploy only upon pushes to master branch
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: website/build