-
Notifications
You must be signed in to change notification settings - Fork 78
40 lines (34 loc) · 1.01 KB
/
ci.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: CI - build,test affected projects on Pr+Merge
on:
pull_request:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
# needed for all cases
- if: github.event_name == 'push' && github.ref_name == 'main'
uses: actions/checkout@v4
# needed for nx affected command
- if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- uses: nrwl/nx-set-shas@v4
# TODO: have different dist locations to run in parallel
- name: Run Nx Affected lint,test
run: npx nx affected --t lint,test
- name: Run Nx Affected build
run: npx nx affected --targets=build --exclude docs
- name: Run build docs
run: npx nx build docs
# - name: Run Nx Affected prerende
# run: npx nx affected --targets=prerender