Deploy script fixed for resume files

This commit is contained in:
shockrah 2023-03-14 20:37:13 -07:00
parent d9432ceff4
commit 9857b9645e
2 changed files with 43 additions and 0 deletions

View File

@ -19,3 +19,30 @@ pages:
artifacts:
paths:
- public
build-resume.shockrah.xyz:
stage: build
only:
refs:
- master
script:
- hugo
artifacts:
paths:
- public
deploy-resume.shockrah.xyz:
stage: deploy
image:
name: amazon/aws-cli:2.2..25
entrypoint: [""]
only:
refs:
- master
needs:
- build-resume.shockrah.xyz
before_script:
- bash scripts/verify-aws-fields.sh
scripts:
- aws s3 cp public/ s3://resume.shockrah.xyz --recursive

16
verify-aws-fields.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -e
echo "Checking to make sure all required AWS env vars are present"
[[ $AWS_DEFAULT_REGION != '' ]]
echo AWS_DEFAULT_REGION is set
[[ $AWS_DEFAULT_REGION != '' ]]
echo AWS_ACCESS_KEY_ID is set
[[ $AWS_DEFAULT_REGION != '' ]]
echo AWS_SECRET_ACCESS_KEY is set