Skip to content

Commit 64fe3e6

Browse files
jonphippsclaude
andcommitted
fix: correct environment mapping from 'dev' to 'development' in workflows
- Fixed environment mapping in test-site-builds.yml (lines 111, 150) - Fixed environment mapping in nx-optimized-ci.yml (DOCS_ENV variable) - Fixed environment mapping in test-site-builds-legacy.yml (lines 104, 139) - Resolves "Invalid environment: dev" error by using valid environment names - Valid environments: local, preview, development, production 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c8ecbd2 commit 64fe3e6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/nx-optimized-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
NX_RUN_GROUP: ${{ github.run_id }}
1414
HUSKY: 0
1515
# Set DOCS_ENV based on branch/event type for proper environment detection
16-
DOCS_ENV: ${{ github.event_name == 'pull_request' && 'preview' || github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'dev' }}
16+
DOCS_ENV: ${{ github.event_name == 'pull_request' && 'preview' || github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'development' || 'development' }}
1717
# Fallback environment variables for sites that need them
1818
SITE_TITLE: IFLA Standards Portal
1919
SITE_TAGLINE: International Federation of Library Associations and Institutions

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- name: Test site configurations
102102
run: |
103103
SITE=${{ github.event.inputs.site || 'all' }}
104-
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
104+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'development' || 'production') }}
105105
node scripts/test-site-builds.js --site $SITE --env $ENV --skip-build
106106
107107
test-site-builds:
@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: Test ${{ matrix.site }} build
138138
run: |
139-
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
139+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'development' || 'production') }}
140140
node scripts/test-site-builds.js --site ${{ matrix.site }} --env $ENV
141141
env:
142142
NODE_OPTIONS: --max-old-space-size=8192

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
- name: Test site configurations
109109
run: |
110110
SITE=${{ github.event.inputs.site || 'affected' }}
111-
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
111+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'development' || 'production') }}
112112
113113
if [ "$SITE" = "affected" ]; then
114114
echo "Testing affected site configurations..."
@@ -147,7 +147,7 @@ jobs:
147147
- name: Build affected or specified sites
148148
run: |
149149
SITE=${{ github.event.inputs.site || 'affected' }}
150-
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'dev' || 'production') }}
150+
ENV=${{ github.event.inputs.environment || (github.ref_name == 'main' && 'production' || github.ref_name == 'dev' && 'development' || 'production') }}
151151
152152
export DOCS_ENV=$ENV
153153
export NODE_OPTIONS="--max-old-space-size=8192"

0 commit comments

Comments
 (0)