Skip to content

Commit 3f13242

Browse files
feat(ci): GitHub action for pull requests (#24)
1 parent 17d01bb commit 3f13242

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/pull-request.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 'Pull Request'
2+
on:
3+
pull_request:
4+
branches:
5+
- dev
6+
paths-ignore:
7+
- .gitignore
8+
- README.md
9+
- LICENSE
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: v21.1.0
21+
cache: 'npm'
22+
cache-dependency-path: '**/package-lock.json'
23+
24+
- name: Cache NPM dependencies
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.npm
28+
key: npm-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
29+
restore-keys: |
30+
npm-cache-${{ runner.os }}-
31+
32+
- name: Install Dependencies and Build
33+
run: |
34+
npm ci
35+
npx prisma generate
36+
npm run build:prod
37+
env:
38+
CI: true
39+
40+
- name: Cache Prisma Binary
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.npm/_npx
44+
key: prisma-binary-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
45+
restore-keys: prisma-binary-${{ runner.os }}-

0 commit comments

Comments
 (0)