-
-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (43 loc) · 1.11 KB
/
build.yaml
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
# Build the site and deploy it to GitHub pages
name: Build
on: # yamllint disable-line rule:truthy
push:
branches:
- master
- main
- '*.*'
- 'staging*'
pull_request:
branches:
- master
- main
- '*.*'
- 'staging*'
permissions:
contents: write
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Install dependencies and set environment variables
env:
NODE_ENV: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name == 'push' && 'production' }}
shell: bash
run: ./ci/install.sh
- name: Build site
shell: bash
run: ./ci/build.sh
- name: Deploy to GitHub Pages
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./build