|
11 | 11 |
|
12 | 12 | permissions: |
13 | 13 | contents: read |
14 | | - pages: write |
15 | | - id-token: write |
16 | | - |
17 | | -concurrency: |
18 | | - group: "pages" |
19 | | - cancel-in-progress: false |
20 | 14 |
|
21 | 15 | jobs: |
22 | | - deploy: |
23 | | - environment: |
24 | | - name: github-pages |
25 | | - url: ${{ steps.deployment.outputs.page_url }} |
| 16 | + validate: |
26 | 17 | runs-on: ubuntu-latest |
27 | 18 | steps: |
28 | 19 | - name: Checkout |
29 | 20 | uses: actions/checkout@v4 |
30 | | - |
31 | | - - name: Setup Pages |
32 | | - uses: actions/configure-pages@v4 |
33 | | - |
34 | | - - name: Upload artifact |
35 | | - uses: actions/upload-pages-artifact@v3 |
36 | | - with: |
37 | | - path: './dashboard' |
38 | 21 |
|
39 | | - - name: Deploy to GitHub Pages |
40 | | - id: deployment |
41 | | - uses: actions/deploy-pages@v4 |
| 22 | + - name: Validate dashboard structure |
| 23 | + run: | |
| 24 | + echo "Validating dashboard files..." |
| 25 | + |
| 26 | + # Check if dashboard directory exists |
| 27 | + if [ ! -d "dashboard" ]; then |
| 28 | + echo "❌ Dashboard directory not found" |
| 29 | + exit 1 |
| 30 | + fi |
| 31 | + |
| 32 | + # Check if index.html exists |
| 33 | + if [ ! -f "dashboard/index.html" ]; then |
| 34 | + echo "❌ dashboard/index.html not found" |
| 35 | + exit 1 |
| 36 | + fi |
| 37 | + |
| 38 | + # Check if assets directory exists |
| 39 | + if [ ! -d "dashboard/assets" ]; then |
| 40 | + echo "❌ dashboard/assets directory not found" |
| 41 | + exit 1 |
| 42 | + fi |
| 43 | + |
| 44 | + echo "✅ Dashboard structure validation passed" |
| 45 | + echo "📁 Dashboard contents:" |
| 46 | + find dashboard -type f | head -10 |
| 47 | + |
| 48 | + - name: Deploy to main branch (main branch only) |
| 49 | + if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 50 | + run: | |
| 51 | + echo "🚀 Deploying dashboard to GitHub Pages..." |
| 52 | + echo "Dashboard will be available at: http://nodeout.stormrelief.com/" |
| 53 | + echo "Note: Actual deployment happens via GitHub Pages legacy mode from main branch" |
0 commit comments