add vercel deploy for web
This commit is contained in:
parent
74f7274a7e
commit
7385b7ba41
17
.drone.yml
Normal file
17
.drone.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: web
|
||||||
|
type: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: deploy web
|
||||||
|
image: node:alpine
|
||||||
|
environment:
|
||||||
|
IS_PROD: true
|
||||||
|
TOKEN:
|
||||||
|
from_secret: VERCEL_TOKEN
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
commands:
|
||||||
|
- npm install -g vercel@latest
|
||||||
|
- /bin/sh ./web/deploy.sh
|
1
web/.vercel/project.json
Normal file
1
web/.vercel/project.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"orgId":"c0DV5ATsGbVZoMVVr9msnlC7","projectId":"prj_6wyilH72l9zcNlIfA9NUAJ0xON0v"}
|
9
web/deploy.sh
Normal file
9
web/deploy.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[ -z $TOKEN ] && printf "Token is missing" && exit 1
|
||||||
|
|
||||||
|
if [ -z $IS_PROD ]; then
|
||||||
|
printf "\nTEST DEPLOYMENT\n"
|
||||||
|
else
|
||||||
|
printf "\nPRODUCTION DEPLOYMENT\n" && PROD="--prod"
|
||||||
|
fi
|
||||||
|
|
||||||
|
URL=$(vercel --yes --global-config ./.vercel --token $TOKEN $PROD) && printf "\nDEPLOYMENT SUCCESSFUL\n$URL"
|
Loading…
x
Reference in New Issue
Block a user