From b804c6259366e7c60c673849a85455fe5c72623f Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Date: Fri, 10 Nov 2023 21:18:01 +0000 Subject: [PATCH] Updated TINA token --- .gitlab-ci.yml | 4 +++- Dockerfile | 8 +++++++- tina/config.ts | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb5a410..ac70f3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ image: jdrouet/docker-with-buildx:stable variables: + # If set to 0 gitlab will not build the image BUILD: 1 DOCKER_HOST: tcp://docker:2375 DOCKER_DRIVER: overlay2 @@ -8,8 +9,9 @@ variables: # Major - Shouldn't change often, Big changes to the site # Minor - starts from 0 when Major is incremented +1 for each version that goes public # Release - For each time a development milestone is reached - VERSION: 1.0.6 + VERSION: 1.1.0 IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION + TINA_TOKEN: $TINA_TOKEN services: - docker:dind diff --git a/Dockerfile b/Dockerfile index e74da38..e256901 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine as Builder # install curl and git -RUN apk add curl git +RUN apk add --update curl git npm # download and unnzip the hugo binary then place it in /usr/local/bin RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.109.0/hugo_0.109.0_linux-arm64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin @@ -13,6 +13,12 @@ RUN git clone --recurse-submodules https://gitlab.com/AHMZA/blog.git # set blog (the folder we just cloned) as the current DIR WORKDIR blog +# set tina_token +ARG TINA_TOKEN + +# build Tina +RUN npm run tinacms build && + # Hugo generates the static files and minifies them RUN hugo --minify diff --git a/tina/config.ts b/tina/config.ts index 7b486cb..a543ac8 100644 --- a/tina/config.ts +++ b/tina/config.ts @@ -5,8 +5,8 @@ const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "main"; export default defineConfig({ branch, - clientId: null, // Get this from tina.io - token: null, // Get this from tina.io + clientId: e4537a30-23f9-4ad7-8a1f-f844a298dff3, // Get this from tina.io + token: $TINA_TOKEN, // Get this from tina.io build: { outputFolder: "admin",