Skip to content

Commit 800eb97

Browse files
Added prisma generate to workflow.
1 parent c616f64 commit 800eb97

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ jobs:
3838
echo "${{ secrets.ENV_FILE_CONTENT }}" > .env
3939
echo "" >> .env
4040
41+
# =======================================================
42+
# 🧩 Initialize Git Submodules (for prisma)
43+
# =======================================================
44+
- name: '🧩 Init Git Submodules'
45+
run: |
46+
git submodule update --init --recursive
47+
48+
# =======================================================
49+
# 🛠️ Generate Prisma Client
50+
# =======================================================
51+
- name: '🛠️ Run Prisma Generate'
52+
run: |
53+
npx prisma generate
54+
working-directory: ./
55+
4156
# =======================================================
4257
# 🐳 Docker Operations
4358
# =======================================================
@@ -76,19 +91,19 @@ jobs:
7691
echo "Ensuring build runs in default server mode..."
7792
export NEXT_OUTPUT_MODE='standalone'
7893
79-
# Step 4: Build the new api image.
80-
echo "Building the latest api image..."
94+
# Step 4: Build the new webapp image.
95+
echo "Building the latest webapp image..."
8196
# Use 'codebuilder' as the stack prefix
82-
docker compose -p codebuilder build api
97+
docker compose -p codebuilder build webapp
8398
84-
# Step 5: Forcefully remove the old api container to prevent conflicts.
85-
echo "Forcefully removing old api container if it exists..."
86-
docker rm -f codebuilder-api || true
99+
# Step 5: Forcefully remove the old webapp container to prevent conflicts.
100+
echo "Forcefully removing old webapp container if it exists..."
101+
docker rm -f codebuilder-webapp || true
87102
88-
# Step 6: Deploy the new api container.
89-
echo "Deploying the new api container..."
103+
# Step 6: Deploy the new webapp container.
104+
echo "Deploying the new webapp container..."
90105
# Use 'codebuilder' as the stack prefix
91-
docker compose -p codebuilder up -d --no-deps api
106+
docker compose -p codebuilder up -d --no-deps webapp
92107
93108
- name: '🗑 Prune Old Docker Images'
94109
if: always()

0 commit comments

Comments
 (0)