variables:
  GIT_SUBMODULE_STRATEGY: recursive

before_script:
  - module load singularity/3.0.2
  - module load awscli

build:
  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
  only:
  - develop
deploy:
  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
  only:
  - master