-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (48 loc) · 1.35 KB
/
build-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
name: Build GOST Website
on:
pull_request:
paths:
- ".github/workflows/build-website.yml"
- "packages/client/**"
- ".node-version"
- ".nvmrc"
- "yarn.lock"
workflow_call:
outputs:
artifact:
description: "Identifier for the website build artifact"
value: ${{ jobs.build.outputs.artifact }}
concurrency:
group: build-website-${{ github.workflow_ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
build:
name: Build website deployment artifact
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
artifact: website-${{ github.sha }}
env:
BUILD_DIR: packages/client
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: yarn
- name: Install dependencies
working-directory: ${{ env.BUILD_DIR }}
run: yarn install --frozen-lockfile
- name: Build the website
working-directory: ${{ env.BUILD_DIR }}
run: yarn build
- name: Upload build artifact
# if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: website-${{ github.sha }}
path: ${{ env.BUILD_DIR }}/dist