mirror of
https://github.com/jetkvm/cloud-api.git
synced 2025-09-16 08:38:15 +00:00
feat(ci): GitHub action for pull requests
This commit is contained in:
parent
e9191d7972
commit
b9e74e0dab
37
workflows/pull-request.yml
Normal file
37
workflows/pull-request.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: 'Pull Request'
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
paths-ignore:
|
||||||
|
- .gitignore
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: v21.1.0
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install Dependencies and Build
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npx prisma generate
|
||||||
|
npm run build:prod
|
||||||
|
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
- name: Cache Prisma Binary
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.npm/_npx
|
||||||
|
key: prisma-binary-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: prisma-binary-${{ runner.os }}-
|
||||||
Loading…
Reference in New Issue
Block a user