temper-tv/.gitlab-ci.yml

68 lines
1.4 KiB
YAML
Raw Normal View History

2023-09-30 09:34:02 +00:00
image: shockrah/website:latest
stages:
- build
- deploy
- golive
2023-09-30 09:34:02 +00:00
############## ################## ##############
############## Build Site Content ##############
############## ################## ##############
build-content:
stage: build
image: shockrah/website:latest
only:
refs:
- master
script:
- cd main-site/ && hugo
artifacts:
2023-10-02 21:52:33 +00:00
expire_in: 1 week
2023-09-30 09:34:02 +00:00
paths:
- main-site/public/
2023-10-06 07:20:10 +00:00
############## ################## ##############
############## 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:
2023-10-07 05:23:00 +00:00
# Upload the content to the bucket itself
2023-10-06 07:20:10 +00:00
- cd main-site/ && aws s3 cp public s3://temper.tv/ --recursive
############## ################## ##############
############## Refresh Container ##############
############## ################## ##############
blue-green-deployment-nginx:
stage: golive
image:
name: amazon/aws-cli:2.2.25
entrypoint: [""]
needs:
- deploy-to-s3
2024-02-20 02:41:38 +00:00
variables:
service: athens-nginx-static-content
cluster: athens-alpha-cluster
before_script:
- bash ci/verify-aws-fields.sh
script:
- aws ecs update-service --cluster $cluster --service $service --force-new-deployment