Hello together, I currently have the problem that I don't understand what I need to write in .gitlab-ci.yml so that I can make a deployment AND then link the dev domain. My goal is to have a preview environment on a specific domain.
Automatic Vercel deployment via Gitlab hooks are turned off.
I've spent hours researching and trying here, but can't find a good solution.
This is what important parts of my .gitlab-ci.yml look like:
.project deploy: stage: deploy image: node:18 before_script: # Prepare env vars - export VERCEL_PROJECT_ID=$VERCEL_STYLEGUIDE_PROJECT_ID # Install Vercel CLI - npm install --global vercel # Go to frontend directory - cd apps/frontend
project_deploy_dev: extends: .project_deploy environment: name: dev script: # Deploy to Vercel - vercel pull --yes --environment=preview --token=$VERCEL_TOKEN - vercel deploy --token=$VERCEL_TOKEN rules: - if: '$CI_COMMIT_BRANCH == "develop"' when: manual
project_deploy_prod: extends: .project_deploy environment: name: prod script: # Deploy to Vercel - vercel pull --yes --environment=production --token=$VERCEL_TOKEN - vercel deploy --prod --token=$VERCEL_TOKEN rules: - if: '$CI_COMMIT_BRANCH == "main"' when: manualDeployments to the prod env are no problem and work so far (with correct domain)
Thank you in advance!
