File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed
Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI and Deploy
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : read
10+ deployments : write
11+ id-token : write
12+
13+ concurrency :
14+ group : ci-${{ github.ref }}
15+ cancel-in-progress : true
16+
17+ jobs :
18+ ci-deploy :
19+ name : Test and Deploy
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - uses : actions/setup-node@v4
25+ with :
26+ node-version : 20
27+ cache : npm
28+ cache-dependency-path : package-lock.json
29+
30+ - name : Install dependencies
31+ run : npm ci
32+
33+ - name : Build project
34+ run : npm run build
35+
36+ - name : Deploy to Vercel
37+ uses : amondnet/vercel-action@v25
38+ with :
39+ vercel-token : ${{ secrets.VERCEL_TOKEN }}
40+ vercel-org-id : ${{ secrets.VERCEL_ORG_ID }}
41+ vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }}
42+ working-directory : .
43+ vercel-args : ' --prod'
Original file line number Diff line number Diff line change 1+ name : CI Tests
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - ' **'
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ unit-tests :
13+ name : Run unit tests
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - uses : actions/setup-node@v4
19+ with :
20+ node-version : 20
21+ cache : npm
22+ cache-dependency-path : package-lock.json
23+
24+ - name : Install dependencies
25+ run : npm ci
26+
27+ - name : Run unit tests
28+ run : npm run test:run
You can’t perform that action at this time.
0 commit comments