Skip to content

Commit baf69d3

Browse files
authored
Merge pull request #1542 from PolicyEngine/codex/rebuild-model-site
Add deploy hook to rebuild model site on release
2 parents 735b98d + f5737be commit baf69d3

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Trigger a rebuild of the policyengine-model site when a new release is published.
2+
# The model site pre-fetches metadata at build time for instant page loads.
3+
# Requires MODEL_SITE_DEPLOY_HOOK secret (Vercel Deploy Hook URL).
4+
name: Rebuild model site
5+
on:
6+
release:
7+
types: [published]
8+
jobs:
9+
trigger:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Trigger Vercel deploy
13+
env:
14+
DEPLOY_HOOK: ${{ secrets.MODEL_SITE_DEPLOY_HOOK }}
15+
run: |
16+
if [ -z "$DEPLOY_HOOK" ]; then
17+
echo "MODEL_SITE_DEPLOY_HOOK secret not set, skipping"
18+
exit 0
19+
fi
20+
curl -X POST "$DEPLOY_HOOK"

0 commit comments

Comments
 (0)