Skip to content

Commit 6a7bb38

Browse files
committed
modified: ci/cd added prisma generate before build
1 parent a5d6017 commit 6a7bb38

File tree

2 files changed

+1786
-858
lines changed

2 files changed

+1786
-858
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,25 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
# Step 1: Checkout code
15-
- name: Checkout repo
16-
uses: actions/checkout@v3
14+
- uses: actions/checkout@v3
1715

18-
# Step 2: Set up Node.js
19-
- name: Set up Node.js
20-
uses: actions/setup-node@v3
16+
- uses: actions/setup-node@v3
2117
with:
2218
node-version: 20
2319

24-
# Step 3: Install pnpm
25-
- name: Install pnpm
26-
run: npm install -g pnpm
20+
- run: npm install -g pnpm
2721

28-
# Step 4: Install dependencies
29-
- name: Install dependencies
30-
run: pnpm install
22+
- run: pnpm install --frozen-lockfile
3123

32-
# Step 5: Run tests (optional, skip if none)
33-
- name: Run tests
34-
run: pnpm test || echo "No tests configured yet"
24+
- run: npx prisma generate
3525

36-
# Step 6: Build TypeScript
37-
- name: Build TypeScript
38-
run: pnpm exec tsc
26+
- run: pnpm exec tsc
3927

40-
# Step 7: Log in to Docker Hub
41-
- name: Log in to Docker Hub
42-
uses: docker/login-action@v2
28+
- uses: docker/login-action@v2
4329
with:
4430
username: ${{ secrets.DOCKER_USERNAME }}
4531
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
4632

47-
# Step 8: Build Docker image
48-
- name: Build Docker image
49-
run: docker build -t raone1422g/restapi:v1.0 .
33+
- run: docker build -t raone1422g/restapi:v1.0 .
5034

51-
# Step 9: Push Docker image
52-
- name: Push Docker image
53-
run: docker push raone1422g/restapi:v1.0
35+
- run: docker push raone1422g/restapi:v1.0

0 commit comments

Comments
 (0)