2023-05-05 11:11:10 +01:00
|
|
|
image: alpine/edge
|
2023-05-05 10:55:58 +01:00
|
|
|
secrets:
|
|
|
|
- a2e02b24-b89f-4d60-8319-c6883b567430
|
|
|
|
- 50b9ba48-c450-43df-a46d-01e2cf0ef9c1
|
|
|
|
packages:
|
2023-05-05 11:11:10 +01:00
|
|
|
- nodejs
|
2023-05-05 11:12:32 +01:00
|
|
|
- npm
|
2023-05-05 10:55:58 +01:00
|
|
|
sources:
|
|
|
|
- git@git.sr.ht:~gmem/well-known-fursona
|
|
|
|
tasks:
|
|
|
|
- vercel-deploy: |
|
|
|
|
set +x
|
|
|
|
export VERCEL_API_TOKEN=$(cat ~/.vercel)
|
|
|
|
set -x
|
|
|
|
cd well-known-fursona
|
|
|
|
mkdir -p .vercel
|
2023-05-05 11:07:52 +01:00
|
|
|
mv ~/.vercel-well-known-fursona .vercel/project.json
|
2023-05-05 11:06:25 +01:00
|
|
|
# Install vercel cli
|
|
|
|
npm i -g vercel
|
2023-05-05 10:55:58 +01:00
|
|
|
# Get current git branch
|
|
|
|
export CI_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
# If trunk branch, use --prod, otherwise just deploy
|
|
|
|
if [ "$CI_BRANCH" = "trunk" ]; then
|
|
|
|
vercel --prod
|
|
|
|
else
|
|
|
|
vercel
|
|
|
|
fi
|