diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20030c21f4b3b484133ea10529d39665d3390179..280d13700e0baa4ef2b2c321991eecbc02e38e2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,23 +5,36 @@ before_script: - module load singularity/3.0.2 - module load awscli +stages: + - build_stage + - deploy_stage + build: + stage: build_stage script: - singularity run 'docker://monachus/hugo' hugo - - singularity run 'docker://monachus/hugo' hugo deploy aws-dev --maxDeletes -1 - - aws s3 ls s3://strandlab.dev/ --recursive | awk '{cmd="aws s3api put-object-acl --acl bucket-owner-full-control --bucket strandlab.dev --key "$4; system(cmd)}' artifacts: paths: - - public + - public/ + expire_in: 1 week + cache: + paths: + - public/ + +deploy.dev: + stage: deploy_stage + script: + - singularity run 'docker://monachus/hugo' hugo deploy aws-dev --maxDeletes -1 + dependencies: + - build only: - develop -deploy: + +deploy.live: + stage: deploy_stage script: - - singularity run 'docker://monachus/hugo' hugo -## - singularity run 'docker://monachus/hugo' hugo deploy aws --maxDeletes -1 -## - aws s3 ls s3://strandlab/ --recursive | awk '{cmd="aws s3api put-object-acl --acl bucket-owner-full-control --bucket strandlab --key "$4; system(cmd)}' - artifacts: - paths: - - public + - singularity run 'docker://monachus/hugo' hugo deploy aws --maxDeletes -1 + dependencies: + - build only: - master \ No newline at end of file