From 5cbbf05653548a37b96a303352bd390311858dff Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 6 Oct 2023 00:20:10 -0700 Subject: [PATCH] Testing deployment pipeline --- .gitlab-ci.yml | 20 ++++++++++++++++++++ ci/verify-aws-fields.sh | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10dfa44..4e0ce0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,3 +26,23 @@ build-content: +############## ################## ############## +############## Deploy Site ############## +############## ################## ############## + +deploy-to-s3: + stage: deploy + # Override entrypoint to avoid weird auto start shenanigans + image: + name: amazon/aws-cli:2.2.25 + entrypoint: [""] + needs: + - build-content + before_script: + - bash ci/verify-aws-fields.sh + script: + # Check to make sure the website bucket is present + - aws s3 bucket-exists project-temper-tv | grep temper.tv + # Next we can upload the content to the bucket itself + - cd main-site/ && aws s3 cp public s3://temper.tv/ --recursive + diff --git a/ci/verify-aws-fields.sh b/ci/verify-aws-fields.sh index 364eef8..41edc13 100644 --- a/ci/verify-aws-fields.sh +++ b/ci/verify-aws-fields.sh @@ -7,10 +7,10 @@ echo "Checking to make sure all required AWS env vars are present" [[ $AWS_DEFAULT_REGION != '' ]] echo AWS_DEFAULT_REGION is set -[[ $AWS_DEFAULT_REGION != '' ]] +[[ $AWS_ACCESS_KEY_ID != '' ]] echo AWS_ACCESS_KEY_ID is set -[[ $AWS_DEFAULT_REGION != '' ]] +[[ $AWS_SECRET_ACCESS_KEY != '' ]] echo AWS_SECRET_ACCESS_KEY is set