From b9ca13f9b6bc506ce8865cbad26a0e25a126f074 Mon Sep 17 00:00:00 2001 From: Remon Oldenbeuving Date: Fri, 12 Jun 2026 14:51:51 +0200 Subject: [PATCH 1/4] ci(deploy): support Vercel target environments --- .github/workflows/deploy-production.yml | 2 ++ .github/workflows/redeploy-web.yml | 2 ++ .github/workflows/stage-vercel-deployment.yml | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index fe9318d3c..231c4c8fd 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -80,12 +80,14 @@ jobs: stage-app: uses: ./.github/workflows/stage-vercel-deployment.yml with: + target_environment: production vercel_project_id_var: VERCEL_PROJECT_ID_APP secrets: inherit stage-global-app: uses: ./.github/workflows/stage-vercel-deployment.yml with: + target_environment: production vercel_project_id_var: VERCEL_PROJECT_ID_GLOBAL_APP secrets: inherit diff --git a/.github/workflows/redeploy-web.yml b/.github/workflows/redeploy-web.yml index 34f1a809f..2f7893626 100644 --- a/.github/workflows/redeploy-web.yml +++ b/.github/workflows/redeploy-web.yml @@ -27,6 +27,7 @@ jobs: needs: verify-main uses: ./.github/workflows/stage-vercel-deployment.yml with: + target_environment: production vercel_project_id_var: VERCEL_PROJECT_ID_APP secrets: inherit @@ -34,6 +35,7 @@ jobs: needs: verify-main uses: ./.github/workflows/stage-vercel-deployment.yml with: + target_environment: production vercel_project_id_var: VERCEL_PROJECT_ID_GLOBAL_APP secrets: inherit diff --git a/.github/workflows/stage-vercel-deployment.yml b/.github/workflows/stage-vercel-deployment.yml index 053e8d1bf..e12ec9aba 100644 --- a/.github/workflows/stage-vercel-deployment.yml +++ b/.github/workflows/stage-vercel-deployment.yml @@ -3,6 +3,10 @@ name: Stage Vercel Deployment on: workflow_call: inputs: + target_environment: + description: 'GitHub and Vercel environment to deploy to' + required: true + type: string vercel_project_id_var: description: 'Name of the GitHub variable containing the Vercel project ID to deploy' required: true @@ -19,12 +23,13 @@ jobs: stage: runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }} timeout-minutes: 30 - environment: production + environment: ${{ inputs.target_environment }} outputs: deployment_url: ${{ steps.deploy.outputs.deployment_url }} env: + TARGET_ENVIRONMENT: ${{ inputs.target_environment }} VERCEL_VERSION: '53.3.1' VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ vars[inputs.vercel_project_id_var] }} @@ -41,7 +46,12 @@ jobs: - name: Stage Vercel deployment id: deploy run: | - deployment_output=$(vercel deploy --prod --skip-domain --token=${{ secrets.VERCEL_TOKEN }}) + if [ "$TARGET_ENVIRONMENT" = "production" ]; then + deployment_output=$(vercel deploy --prod --skip-domain --token=${{ secrets.VERCEL_TOKEN }}) + else + deployment_output=$(vercel deploy --target="$TARGET_ENVIRONMENT" --token=${{ secrets.VERCEL_TOKEN }}) + fi + deployment_url=$(printf '%s\n' "$deployment_output" | tail -n 1) if [[ ! "$deployment_url" =~ ^https:// ]]; then echo "Vercel deploy did not print a deployment URL" >&2 From 221de976b3c3e274dd540e6e4489491a4587a757 Mon Sep 17 00:00:00 2001 From: Remon Oldenbeuving Date: Fri, 12 Jun 2026 15:07:15 +0200 Subject: [PATCH 2/4] ci(deploy): add manual Vercel staging deploy --- .github/workflows/deploy-staging.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/deploy-staging.yml diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml new file mode 100644 index 000000000..3df51f73c --- /dev/null +++ b/.github/workflows/deploy-staging.yml @@ -0,0 +1,26 @@ +name: Deploy Web to Staging + +on: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: deploy-staging + cancel-in-progress: false + +jobs: + deploy-app: + uses: ./.github/workflows/stage-vercel-deployment.yml + with: + target_environment: staging + vercel_project_id_var: VERCEL_PROJECT_ID_APP + secrets: inherit + + deploy-global-app: + uses: ./.github/workflows/stage-vercel-deployment.yml + with: + target_environment: staging + vercel_project_id_var: VERCEL_PROJECT_ID_GLOBAL_APP + secrets: inherit From 6f30ee2e07374fe6e429aa5de07e22e53816ce79 Mon Sep 17 00:00:00 2001 From: Remon Oldenbeuving Date: Fri, 12 Jun 2026 15:11:05 +0200 Subject: [PATCH 3/4] ci(deploy): test staging deploy on pull requests --- .github/workflows/deploy-staging.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 3df51f73c..55abe43da 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -1,6 +1,8 @@ name: Deploy Web to Staging on: + pull_request: + branches: [main] workflow_dispatch: permissions: From f4aa8192ac4a46c8094f05f226d8c3f21ff3b218 Mon Sep 17 00:00:00 2001 From: Remon Oldenbeuving Date: Fri, 12 Jun 2026 15:53:18 +0200 Subject: [PATCH 4/4] ci(deploy): restore manual-only staging deploy --- .github/workflows/deploy-staging.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 55abe43da..3df51f73c 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -1,8 +1,6 @@ name: Deploy Web to Staging on: - pull_request: - branches: [main] workflow_dispatch: permissions: