Updated the gitlab CI to be more customizable

This commit is contained in:
Jeffrey Phillips Freeman 2023-10-08 15:17:22 -04:00
parent 2c0f301537
commit f691ad24a7
No known key found for this signature in database
GPG key ID: AD914585C9406B6A
2 changed files with 18 additions and 10 deletions

View file

@ -8,9 +8,9 @@ deploy_preview:
- develop
script:
- npm install --global vercel
- vercel pull --yes --environment=preview --token="${VERCEL_TOKEN}" -S flear
- vercel build --token="${VERCEL_TOKEN}" -S flear
- vercel deploy --prebuilt --token="${VERCEL_TOKEN}" -S flear
- vercel pull --yes --environment=preview --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
- vercel build --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
- vercel deploy --prebuilt --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
deploy_development:
stage: deploy
@ -18,9 +18,9 @@ deploy_development:
- develop
script:
- npm install --global vercel
- vercel pull --yes --environment=development --token="${VERCEL_TOKEN}" -S flear
- vercel build --token="${VERCEL_TOKEN}" -S flear
- vercel deploy --prebuilt --token="${VERCEL_TOKEN}" -S flear
- vercel pull --yes --environment=development --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
- vercel build --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
- vercel deploy --prebuilt --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
deploy_production:
stage: deploy
@ -28,6 +28,6 @@ deploy_production:
- master
script:
- npm install --global vercel
- vercel pull --yes --environment=production --token="${VERCEL_TOKEN}" -S flear
- vercel build --prod --token="${VERCEL_TOKEN}" -S flear
- vercel deploy --prebuilt --prod --token="${VERCEL_TOKEN}" -S flear
- vercel pull --yes --environment=production --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
- vercel build --prod --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"
- vercel deploy --prebuilt --prod --token="${VERCEL_TOKEN}" -S "${VERCEL_SCOPE}"

View file

@ -5,7 +5,6 @@ npm install ts-node typescript '@types/node'
./node_modules/.bin/ts-node --esm generateKeys.mts
```
## Setup firebase
Setup the things
@ -23,3 +22,12 @@ curl -G -X POST --data-urlencode token="<token>" https://flear.org/send-note
# License
This project (excluding post content itself) is released under the Apache License v2
# Notes to reconcile later
* Set configuration in /hugo.toml (defaults are in /config/* dont touch)
* Set Gitlab CI ENV variables:
** VERCEL_ORG_ID
** VERCEL_PROJECT_ID
** VERCEL_TOKEN (mask this and make it availible to only protected)
** VERCEL_SCOPE (set to vercel team id, find with `vercel team ls` after creating)