|
38 | 38 | echo "${{ secrets.ENV_FILE_CONTENT }}" > .env
|
39 | 39 | echo "" >> .env
|
40 | 40 |
|
| 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 | + |
41 | 56 | # =======================================================
|
42 | 57 | # 🐳 Docker Operations
|
43 | 58 | # =======================================================
|
@@ -76,19 +91,19 @@ jobs:
|
76 | 91 | echo "Ensuring build runs in default server mode..."
|
77 | 92 | export NEXT_OUTPUT_MODE='standalone'
|
78 | 93 |
|
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..." |
81 | 96 | # Use 'codebuilder' as the stack prefix
|
82 |
| - docker compose -p codebuilder build api |
| 97 | + docker compose -p codebuilder build webapp |
83 | 98 |
|
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 |
87 | 102 |
|
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..." |
90 | 105 | # 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 |
92 | 107 |
|
93 | 108 | - name: '🗑 Prune Old Docker Images'
|
94 | 109 | if: always()
|
|
0 commit comments