.gitlab-ci.yml 860 Bytes
Newer Older
Pietro Saccardi's avatar
Pietro Saccardi committed
1 2
stages:
  - build
Pietro Saccardi's avatar
Pietro Saccardi committed
3 4 5
  - staging
  - deploy

Pietro Saccardi's avatar
Pietro Saccardi committed
6 7 8

build:lektor:
  stage: build
9
  image: nikolaik/python-nodejs
Pietro Saccardi's avatar
Pietro Saccardi committed
10 11 12 13 14 15 16
  before_script:
    - pipenv install
  script:
    - pipenv run lektor build -f webpack -O www
  artifacts:
    paths:
      - www
Pietro Saccardi's avatar
Pietro Saccardi committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46


staging:testing:
  stage: staging
  image: nikolaik/python-nodejs
  environment:
    name: staging
    url: https://www.test.mittelab.org
  before_script:
    - pipenv install
  script:
    - pipenv run lektor deploy -O www --key "${DEPLOY_KEY}" --username "${DEPLOY_USER}" testing
  only:
    - master


deploy:production:
  stage: deploy
  image: nikolaik/python-nodejs
  environment:
    name: deploy
    url: https://www.mittelab.org
  before_script:
    - pipenv install
  script:
    - pipenv run lektor deploy -O www --key "${DEPLOY_KEY}" --username "${DEPLOY_USER}" production
  only:
    - master
  when: manual