Skip to content

Commit ff11b51

Browse files
jonphippsclaude
andcommitted
fix: use correct environment URLs based on branch in CI tests
- Update test-site-builds.yml to dynamically set ENV based on branch - dev branch now uses 'dev' environment (jonphipps.github.io URLs) - main branch uses 'production' environment (www.iflastandards.info URLs) - Ensures CI tests validate the correct environment-specific URLs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 9a6cc57 commit ff11b51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/test-site-builds.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
- name: Test site configurations
108108
run: |
109109
SITE=${{ github.event.inputs.site || 'all' }}
110-
ENV=${{ github.event.inputs.environment || 'production' }}
110+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
111111
node scripts/test-site-builds.js --site $SITE --env $ENV --skip-build
112112
113113
test-site-builds:
@@ -145,7 +145,7 @@ jobs:
145145

146146
- name: Test ${{ matrix.site }} build
147147
run: |
148-
ENV=${{ github.event.inputs.environment || 'production' }}
148+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
149149
node scripts/test-site-builds.js --site ${{ matrix.site }} --env $ENV
150150
env:
151151
NODE_OPTIONS: --max-old-space-size=8192
@@ -192,7 +192,7 @@ jobs:
192192
- name: Run URL validation tests
193193
run: |
194194
SITE=${{ github.event.inputs.site || 'all' }}
195-
ENV=${{ github.event.inputs.environment || 'production' }}
195+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
196196
# Test sitemap generation
197197
node scripts/validate-environment-urls.js --site $SITE --env $ENV --type sitemap
198198

0 commit comments

Comments
 (0)