-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
action.yml
36 lines (33 loc) · 1.23 KB
/
action.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
name: 'Prepare: Build'
description: 'Prepares the repo for a job by running the build'
# inputs: - no inputs
# outputs: - no outputs
runs:
using: 'composite'
steps:
- uses: actions/cache@v4
id: build-cache
with:
path: '**/dist/**'
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.run_id }}
# We don't want to share builds across runs even for the same branch
# because each commit can have different build artifacts and we don't
# want to accidentally share artifacts and poison the build output
restore-keys: |
${{ runner.os }}-build-${{ github.ref }}-${{ github.run_id }}
# If the cache was hit, then we still run the types build because we generate source files
- name: Build AST Spec
if: steps['build-cache'].outputs.cache-hit == 'true'
shell: bash
run: |
npx nx run types:build
env:
SKIP_AST_SPEC_REBUILD: true
- name: Build
if: steps['build-cache'].outputs.cache-hit != 'true'
shell: bash
# Website will be built by the Netlify GitHub App
run: |
npx nx run-many --target=build --parallel --exclude=website --exclude=website-eslint
env:
SKIP_AST_SPEC_REBUILD: true