Skip to content

Commit 003653b

Browse files
authored
Update nextjs.yml
1 parent 5f57979 commit 003653b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/nextjs.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,29 @@ jobs:
4747
- name: Install project dependencies
4848
run: npm ci
4949

50-
# Step 4: Build the project
50+
# Step 4: Build the project
5151
- name: Build the project
5252
run: npm run build
5353

54-
# Step 5: Configure GitHub Pages
54+
# Step 5: Verify build directory exists (add this step)
55+
- name: Verify build directory
56+
run: |
57+
if [ ! -d "./dist" ]; then
58+
echo "Error: Build directory './dist' does not exist. Check your build script.";
59+
exit 1
60+
fi
61+
62+
# Step 6: Configure GitHub Pages
5563
- name: Configure GitHub Pages
5664
uses: actions/configure-pages@v4
5765

58-
# Step 6: Upload build artifacts
66+
# Step 7: Upload build artifacts
5967
- name: Upload build artifacts
6068
uses: actions/upload-pages-artifact@v3
6169
with:
62-
path: ./dist
70+
path: ./dist # <-- Change './dist' to your build output directory if needed
6371

64-
# Step 7: Deploy to GitHub Pages
72+
# Step 8: Deploy to GitHub Pages
6573
- name: Deploy to GitHub Pages
6674
id: deployment
6775
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)