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

Gervaise Henry's avatar
Gervaise Henry committed
before_script:
  - module load singularity/3.5.3
  - module load awscli/1.11.139
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 https://dev.strandlab.net/
  artifacts:
    paths:
Gervaise Henry's avatar
Gervaise Henry committed
      - 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:
Gervaise Henry's avatar
Gervaise Henry committed
    - singularity run 'docker://monachus/hugo' hugo
Gervaise Henry's avatar
Gervaise Henry committed
  artifacts:
    paths:
Gervaise Henry's avatar
Gervaise Henry committed
      - public/
    expire_in: 1 week
  cache:
    paths:
      - public/
Gervaise Henry's avatar
Gervaise Henry committed
  only:
Gervaise Henry's avatar
Gervaise Henry committed
    - tags
Gervaise Henry's avatar
Gervaise Henry committed

test:
  stage: test_stage
  script:
Gervaise Henry's avatar
Gervaise Henry committed
    - singularity run 'docker://18fgsa/html-proofer:gitlab-ci' htmlproofer ./public --empty_alt_ignore --disable_external true

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

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