well-known-fursona/.build.yml

27 lines
701 B
YAML
Raw Normal View History

2023-05-05 10:55:58 +01:00
image: nixos/unstable
secrets:
- a2e02b24-b89f-4d60-8319-c6883b567430
- 50b9ba48-c450-43df-a46d-01e2cf0ef9c1
packages:
2023-05-05 11:06:25 +01:00
- nixos.nodejs
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
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