Commit 98465e1f authored by ThinhNC's avatar ThinhNC

fix(ci): switch to vercel cloud build to resolve runner SIGBUS

parent 79cf8090
Pipeline #53706 passed with stage
in 34 seconds
......@@ -3,27 +3,19 @@ image: node:20-alpine
stages:
- deploy
# Tự động deploy Production khi push / merge vào nhánh master
# Deploy Production lên Vercel khi merge/push vào master (sử dụng Cloud Build của Vercel)
deploy_production:
stage: deploy
only:
- master
before_script:
- npm install -g vercel
script:
- vercel pull --yes --environment=production --token=$VERCEL_TOKEN
- vercel build --prod --token=$VERCEL_TOKEN
- vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
- npx --yes vercel deploy --prod --token=$VERCEL_TOKEN --yes
# Deploy Preview khi push vào nhánh develop hoặc tạo Merge Request
# Deploy Preview lên Vercel khi push vào develop hoặc tạo Merge Request
deploy_preview:
stage: deploy
only:
- develop
- merge_requests
before_script:
- npm install -g vercel
script:
- vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
- vercel build --token=$VERCEL_TOKEN
- vercel deploy --prebuilt --token=$VERCEL_TOKEN
- npx --yes vercel deploy --token=$VERCEL_TOKEN --yes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment