77 inputs :
88 git_tag :
99 description : >
10- "Git tag for deployment (format: develop/v0.0.1 or release/v0.0.1)"
10+ "Git tag (format: attached/ develop/v0.0.1 or attached/ release/v0.0.1)"
1111 required : true
1212 type : string
1313
1414jobs :
1515 publish :
1616 runs-on : ubuntu-22.04
1717 timeout-minutes : 60
18- environment :
19- name : ${{ contains(inputs.git_tag, 'release/') && 'Production' || 'Preview' }}
2018 steps :
2119 - name : Checkout self repository
2220 uses : actions/checkout@v4
3634 run : node ./internals/github/dist/validate_git_tag.js
3735 env :
3836 GIT_TAG : " ${{ inputs.git_tag }}"
39-
37+
38+ - name : Determine deploy environment
39+ id : deploy_env
40+ run : node ./internals/github/dist/determine_deploy_env.js
41+ env :
42+ GIT_TAG : " ${{ inputs.git_tag }}"
43+
4044 - name : Enable Corepack
4145 run : corepack enable
4246
@@ -61,20 +65,24 @@ jobs:
6165 - name : Build SDK packages
6266 run : yarn ci build_sdk
6367
64- - name : Determine deploy environment
65- id : deploy_env
66- run : node ./internals/github/dist/determine_deploy_env.js
67- env :
68- GIT_TAG : " ${{ inputs.git_tag }}"
69-
7068 - name : Install Vercel CLI
7169 run : npm install -g vercel@latest
7270
7371 - name : Pull Vercel Environment Information
7472 run : vercel pull --yes --environment=${{ steps.deploy_env.outputs.vercel_env }} --token=${{ secrets.VERCEL_TOKEN }}
7573
74+ - name : Verify environment variables
75+ run : |
76+ ENV_FILE=".vercel/.env.${{ steps.deploy_env.outputs.vercel_env }}.local"
77+ if [ ! -f "$ENV_FILE" ]; then
78+ echo "::error::Environment file not found: $ENV_FILE"
79+ echo "vercel pull may have failed to fetch environment variables."
80+ exit 1
81+ fi
82+ echo "Environment file found: $ENV_FILE"
83+
7684 - name : Build Project Artifacts
77- run : vercel build ${{ steps.deploy_env.outputs.vercel_build_flag }} --token=${{ secrets.VERCEL_TOKEN }}
85+ run : vercel build --yes ${{ steps.deploy_env.outputs.vercel_build_flag }} --token=${{ secrets.VERCEL_TOKEN }}
7886
7987 - name : Deploy Project Artifacts to Vercel
8088 run : vercel deploy --prebuilt ${{ steps.deploy_env.outputs.vercel_deploy_flag }} --token=${{ secrets.VERCEL_TOKEN }}
0 commit comments