-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (88 loc) · 3.15 KB
/
Copy pathdeploy-pages.yml
File metadata and controls
103 lines (88 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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 }}