Skip to content

Commit fdffa10

Browse files
author
Valtronics Team
committed
Create dedicated site deployment workflow
- Add deploy-site.yml workflow for GitHub Pages deployment - Configure workflow to trigger on site directory changes - Add site directory verification step - Include deployment status output - Ensure proper GitHub Pages permissions and configuration
1 parent a6a608c commit fdffa10

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/deploy-site.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ 'site/**' ]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Pages
26+
uses: actions/configure-pages@v4
27+
28+
- name: Verify site directory
29+
run: |
30+
echo "Site directory contents:"
31+
ls -la site/
32+
echo "Checking for index.html..."
33+
if [ -f "site/index.html" ]; then
34+
echo "✅ index.html found"
35+
else
36+
echo "❌ index.html not found"
37+
exit 1
38+
fi
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: './site'
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
permissions:
52+
pages: write
53+
id-token: write
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4
58+
59+
- name: Output deployment info
60+
run: |
61+
echo "🚀 Site deployed successfully!"
62+
echo "📦 Page URL: ${{ steps.deployment.outputs.page_url }}"
63+
echo "🌐 Expected URL: https://autobotsolutions.github.io/Valtronics/"

0 commit comments

Comments
 (0)