Skip to content

Commit 2cab5ec

Browse files
author
Valtronics Team
committed
Add comprehensive GitHub Pages fix workflow
- Create pages-fix.yml with enhanced deployment configuration - Add CNAME file creation for custom domain - Include site content verification - Add error handling and debug information - Use enhanced deployment options for troubleshooting
1 parent 0847e40 commit 2cab5ec

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/pages-fix.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Fix GitHub Pages Deployment
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+
build-and-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 CNAME file
24+
run: |
25+
echo "valtronics.autobotsolutions.com" > site/CNAME
26+
27+
- name: List site contents
28+
run: |
29+
echo "Site directory contents:"
30+
ls -la site/
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: './site'
36+
retention-days: 1
37+
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
runs-on: ubuntu-latest
43+
needs: build-and-deploy
44+
permissions:
45+
pages: write
46+
id-token: write
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4
51+
with:
52+
error_count: 10
53+
error_messages: true

0 commit comments

Comments
 (0)