Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.2 KiB
Newer Older
variables:
  GIT_SUBMODULE_STRATEGY: recursive

before_script:
  - module load singularity/3.0.2
Gervaise Henry's avatar
Gervaise Henry committed
  - module load awscli
stages:
  - build_stage
Gervaise Henry's avatar
Gervaise Henry committed
  - test_stage
  - deploy_stage

build.dev:
  stage: build_stage
  script:
  - singularity run 'docker://monachus/hugo' hugo --baseURL http://strandlab.dev.s3-website.us-east-2.amazonaws.com/
  artifacts:
    paths:
    - public/
    expire_in: 1 week
  cache:
    paths:
    - public/
Gervaise Henry's avatar
Gervaise Henry committed
  except:
    - tags

build.live:
  stage: build_stage
Gervaise Henry's avatar
Gervaise Henry committed
  script:
  - singularity run 'docker://monachus/hugo' hugo
  artifacts:
    paths:
    - public/
    expire_in: 1 week
  cache:
    paths:
    - public/
Gervaise Henry's avatar
Gervaise Henry committed
  only:
Gervaise Henry's avatar
Gervaise Henry committed
  - tags

test:
  stage: test_stage
  script:
    - singularity run 'docker://18fgsa/html-proofer:gitlab-ci' htmlproofer ./public --empty_alt_ignore --url-ignore "https://twitter.com/strand_lab"  

deploy.dev:
  stage: deploy_stage
  script:
  - singularity run 'docker://monachus/hugo' hugo deploy --target aws-dev --maxDeletes -1
  dependencies:
Gervaise Henry's avatar
Gervaise Henry committed
  - build.dev
  only:
  - master
Gervaise Henry's avatar
Gervaise Henry committed
  except:
  - tags

deploy.live:
  stage: deploy_stage
  - singularity run 'docker://monachus/hugo' hugo deploy --target aws --maxDeletes -1
  dependencies:
Gervaise Henry's avatar
Gervaise Henry committed
  - build.live