Commit 3f0333dd authored by Totara-thib's avatar Totara-thib
Browse files

fix(vercel_deploy): Fix build command behavior

parent 299a4a86
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
# Changelog
All notable changes to this job will be documented in this file.

## [0.1.1] - 2023-07-19
* Fix build command behavior for production environment

## [0.1.0] - 2023-07-18
* Initial version
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ vercel_deploy:
    VERCEL_ENV: "preview" # change the default value "production"
    TEAM_SLUG_SCOPE: "team-slug" # your team slug
    VERCEL_ENV_GENERATED_URL: "project-name-author-name-scope-slug.vercel.app" # your vercel preview environment generated url
    CUSTOM_DOMAIN: "mycustomdomain.com" # your custom domain
    CUSTOM_DOMAIN: "mycustomdomain.tech" # your custom domain

# New job that extends the remotely included vercel_deploy job
vercel_deploy_prod: 
@@ -53,6 +53,7 @@ vercel_deploy_prod:
  extends:
    - vercel_deploy
  variables:
    VERCEL_ENV: "production"
    TEAM_SLUG_SCOPE: "team-slug" # your team slug
    VERCEL_ENV_GENERATED_URL: "project-name-scope-slug.vercel.app" # your vercel production environment generated url
    CUSTOM_DOMAIN: "mycustomdomain.com" # your custom domain
+2 −1
Original line number Diff line number Diff line
@@ -15,11 +15,12 @@ vercel_deploy:
  script:
    - npm install --global vercel
    - vercel pull --yes --environment=$VERCEL_ENV --token=$VERCEL_TOKEN --scope=$TEAM_SLUG_SCOPE
    - vercel build --token=$VERCEL_TOKEN --scope=$TEAM_SLUG_SCOPE
    - if [ "${VERCEL_ENV}" == "production" ]; then
    -   vercel build --prod --token=$VERCEL_TOKEN --scope=$TEAM_SLUG_SCOPE
    -   vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN --scope=$TEAM_SLUG_SCOPE
    - fi
    - if [ "${VERCEL_ENV}" == "preview" ]; then
    -   vercel build --token=$VERCEL_TOKEN --scope=$TEAM_SLUG_SCOPE
    -   vercel deploy --prebuilt --token=$VERCEL_TOKEN --scope=$TEAM_SLUG_SCOPE
    - fi
    - if [ "${CUSTOM_DOMAIN}" != "" ] && [ "${VERCEL_ENV_GENERATED_URL}" != "" ]; then