11name : redirects-in-sync
22
3- # Guarantees vercel.json matches redirects.config.js (the single source of
4- # truth). Vercel reads vercel.json at the start of a deployment, so a commit
5- # that edits redirects.config.js without regenerating vercel.json would ship
6- # stale production redirects. This job regenerates the file and fails if it
7- # differs from what's committed.
3+ # Guarantees render.yaml matches redirects.config.js (the single source of
4+ # truth). Render reads render.yaml at the start of a deployment, so a commit
5+ # that edits redirects.config.js without regenerating render.yaml would ship
6+ # stale production redirects. This job regenerates the generated block and fails
7+ # if it differs from what's committed.
88
99on :
1010 pull_request :
@@ -22,14 +22,14 @@ jobs:
2222
2323 # No `npm install` needed: the sync script uses only Node built-ins and
2424 # imports the local redirects.config.js.
25- - name : Regenerate vercel.json from redirects.config.js
26- run : node scripts/sync-vercel -redirects.mjs
25+ - name : Regenerate render.yaml from redirects.config.js
26+ run : node scripts/sync-render -redirects.mjs
2727
28- - name : Fail if vercel.json is out of date
28+ - name : Fail if render.yaml is out of date
2929 run : |
30- if [ -n "$(git status --porcelain vercel.json )" ]; then
31- echo "::error::vercel.json is out of sync with redirects.config.js. Run 'npm run sync-redirects' and commit the result."
32- git --no-pager diff vercel.json
30+ if [ -n "$(git status --porcelain render.yaml )" ]; then
31+ echo "::error::render.yaml is out of sync with redirects.config.js. Run 'npm run sync-redirects' and commit the result."
32+ git --no-pager diff render.yaml
3333 exit 1
3434 fi
35- echo "vercel.json is in sync with redirects.config.js."
35+ echo "render.yaml is in sync with redirects.config.js."
0 commit comments