From f691ad24a7fcf2fc55a1bdb0d533e7d5b1ae873a Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Sun, 8 Oct 2023 15:17:22 -0400
Subject: [PATCH] Updated the gitlab CI to be more customizable

---
 .gitlab-ci.yml | 18 +++++++++---------
 README.md      | 10 +++++++++-
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b0c207554..1777bd573 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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}"
diff --git a/README.md b/README.md
index 93fcfac23..6515c098e 100644
--- a/README.md
+++ b/README.md
@@ -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)
-- 
GitLab