-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.08 KB
/
test-lint-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
name: 'test-lint-build'
on:
push:
jobs:
test:
name: Test lint, build
runs-on: ubuntu-latest
env:
working-directory: ./client
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Cache node modules
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: npm-packages-${{ hashFiles('**/package-lock.json') }}
- name: Generate Environment Variables File for Production
run: echo "NEXT_PUBLIC_OPEN_API=$NEXT_PUBLIC_OPEN_API" >> .env.production
working-directory: ${{ env.working-directory }}
env:
NEXT_PUBLIC_OPEN_API: ${{ secrets.NEXT_PUBLIC_OPEN_API }}
- name: Install Dependencies
run: yarn install
working-directory: ${{ env.working-directory }}
- run: yarn lint
if: ${{ always() }}
working-directory: ${{ env.working-directory }}
- run: yarn build
if: ${{ always() }}
working-directory: ${{ env.working-directory }}