Skip to content

Deploy Know the Gulf to GitHub Pages #1349

Deploy Know the Gulf to GitHub Pages

Deploy Know the Gulf to GitHub Pages #1349

Workflow file for this run

name: Deploy Know the Gulf to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
workflow_run:
workflows:
- Poll current PCB beach flag
- Poll current Destin beach flag
- Update western Gulf data
- Update eastern Panhandle flags
- Update Southwest Florida locations
- Refresh Know the Gulf research dataset
- Refresh measured NOAA and storm history
- Backfill NWS Surf Zone history
types: [completed]
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-deploy
cancel-in-progress: false
jobs:
deploy:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy_1.outputs.page_url || steps.deploy_2.outputs.page_url || steps.deployment.outputs.page_url }}
env:
PAGES_ARTIFACT_NAME: github-pages-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Checkout latest main
uses: actions/checkout@v6
with:
ref: main
- name: Validate frontend JavaScript
run: |
node --check assets/app.js
node --check assets/menu.js
node --check assets/beach-nav.js
node --check assets/site-ui.js
node --check assets/quality-ui.js
node --check assets/western-location.js
node --check assets/eastern-location.js
node --check assets/southwest-location.js
node --check assets/location-page.js
- name: Validate deployment helpers
run: |
python -m py_compile scripts/inject_social_meta.py scripts/site_health_check.py
- name: Inject standardized UI and social metadata
run: python scripts/inject_social_meta.py
- name: Repository-wide site health gate
run: python scripts/site_health_check.py
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Upload site artifact
uses: actions/upload-pages-artifact@v4
with:
name: ${{ env.PAGES_ARTIFACT_NAME }}
path: '.'
- name: Deploy to GitHub Pages - attempt 1
id: deploy_1
continue-on-error: true
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.PAGES_ARTIFACT_NAME }}
- name: Wait before deployment retry 2
if: steps.deploy_1.outcome == 'failure'
run: sleep 15
- name: Deploy to GitHub Pages - attempt 2
id: deploy_2
if: steps.deploy_1.outcome == 'failure'
continue-on-error: true
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.PAGES_ARTIFACT_NAME }}
- name: Wait before final deployment retry
if: steps.deploy_1.outcome == 'failure' && steps.deploy_2.outcome == 'failure'
run: sleep 30
- name: Deploy to GitHub Pages - final attempt
id: deployment
if: steps.deploy_1.outcome == 'failure' && steps.deploy_2.outcome == 'failure'
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.PAGES_ARTIFACT_NAME }}