-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.25 KB
/
client.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
45
46
47
48
49
50
51
52
53
54
55
56
name: Client CI/CD
on:
push:
branches: [ '**' ]
paths:
- 'client/**'
pull_request:
branches: [ main ]
paths:
- 'client/**'
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
working-directory: ./client
run: npm install
- name: Lint
working-directory: ./client
run: npm run lint
- name: Run tests
working-directory: ./client
run: npm test
# This assumes you have a test script in your package.json
- name: Build
working-directory: ./client
run: npm run build
# Builds your application, make sure you have a build script in your package.json
deploy:
needs: build_and_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v1
# - name: Vercel Deploy
# uses: amondnet/vercel-action@v20
# with:
# vercel_token: ${{ secrets.VERCEL_TOKEN }}
# project_name: "group-project-team-7"
# org_id: ${{ secrets.VERCEL_ORG_ID }}
# project_id: ${{ secrets.VERCEL_PROJECT_ID }}