Skip to content

Commit 97f656a

Browse files
author
Valtronics Team
committed
Create ultimate GitHub Pages fix workflow
- Add comprehensive deployment with full debugging - Create .nojekyll and CNAME files automatically - Include detailed site file verification - Add deployment summary with multiple URL formats - Use retention-days: 0 for immediate deployment - Provide comprehensive troubleshooting information
1 parent 2cab5ec commit 97f656a

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Ultimate GitHub Pages Fix
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Pages
21+
uses: actions/configure-pages@v4
22+
23+
- name: Create .nojekyll file
24+
run: touch site/.nojekyll
25+
26+
- name: Create CNAME file
27+
run: echo "valtronics.autobotsolutions.com" > site/CNAME
28+
29+
- name: List all site files
30+
run: |
31+
echo "=== Site Directory Contents ==="
32+
ls -la site/
33+
echo "=== Checking index.html ==="
34+
if [ -f "site/index.html" ]; then
35+
echo "✅ index.html found"
36+
head -10 site/index.html
37+
else
38+
echo "❌ index.html not found"
39+
exit 1
40+
fi
41+
echo "=== Checking .nojekyll ==="
42+
if [ -f "site/.nojekyll" ]; then
43+
echo "✅ .nojekyll found"
44+
else
45+
echo "❌ .nojekyll not found"
46+
fi
47+
echo "=== Checking CNAME ==="
48+
if [ -f "site/CNAME" ]; then
49+
echo "✅ CNAME found"
50+
cat site/CNAME
51+
else
52+
echo "❌ CNAME not found"
53+
fi
54+
55+
- name: Upload artifact
56+
uses: actions/upload-pages-artifact@v3
57+
with:
58+
path: './site'
59+
retention-days: 0
60+
61+
deploy-pages:
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
runs-on: ubuntu-latest
66+
needs: deploy
67+
permissions:
68+
pages: write
69+
id-token: write
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4
74+
75+
- name: Deployment Summary
76+
run: |
77+
echo "## 🚀 GitHub Pages Deployment Complete" >> $GITHUB_STEP_SUMMARY
78+
echo "- **Status**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
79+
echo "- **Page URL**: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
80+
echo "- **Expected URLs**:" >> $GITHUB_STEP_SUMMARY
81+
echo " - https://autobotsolutions.github.io/Valtronics/" >> $GITHUB_STEP_SUMMARY
82+
echo " - https://autobotsolutions.github.io/valtronics/" >> $GITHUB_STEP_SUMMARY
83+
echo " - https://valtronics.autobotsolutions.com/" >> $GITHUB_STEP_SUMMARY
84+
echo "- **Files Deployed**: $(ls site/ | wc -l) files" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)