-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 945 Bytes
/
build.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
name: Build Artifact
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_call:
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
NUXT_APP_BASE_URL: /RadioRecord/
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
- name: Set variables
run: |
echo "NUXT_PUBLIC_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_ENV"
echo "NUXT_PUBLIC_HASH=${GITHUB_SHA}" >> "$GITHUB_ENV"
- name: Build website
run: |
yarn install --immutable --immutable-cache --check-cache
yarn generate
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: .output/public