-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 954 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
41
42
43
44
name: Build
on:
pull_request:
paths-ignore:
- '**/*.md'
jobs:
build:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: ["16", "18"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install and Build
env:
FAUST_SECRET_KEY: ${{secrets.FAUST_SECRET_KEY}}
NEXT_PUBLIC_WORDPRESS_URL: ${{secrets.NEXT_PUBLIC_WORDPRESS_URL}}
run: |
npm ci
npm run build
- name: Error handling
if: failure()
run: echo "Build failed!"