Skip to content
.gitlab-ci.yml 1.17 KiB
Newer Older
Justin Weber's avatar
Justin Weber committed
image: sphinxdoc/sphinx:latest

stages:
Justin Weber's avatar
Justin Weber committed
  - build-docs
Justin Weber's avatar
Justin Weber committed
  - deploy

################################################################################
# Build Docs
################################################################################
docs:userguide:
  image: sphinxdoc/sphinx:latest
  script:
Justin Weber's avatar
Justin Weber committed
    - pip install sphinx_rtd_theme sphinx_tabs
Justin Weber's avatar
Justin Weber committed
    - sphinx-build -b html docs/source_docs/ build/docs
    - sphinx-build -b html docs/picvva/ build/picvva
Justin Weber's avatar
Justin Weber committed
  stage: build-docs
  except:
    - schedules
  artifacts:
    name: $CI_JOB_NAME
    expire_in: 1 week
    paths:
Justin Weber's avatar
Justin Weber committed
      - build
Justin Weber's avatar
Justin Weber committed
  tags:
    - docker

################################################################################
# Deploy
################################################################################
deploy:docs:
  needs: ['docs:userguide']
Justin Weber's avatar
Justin Weber committed
  image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
Justin Weber's avatar
Justin Weber committed
  variables:
Justin Weber's avatar
Justin Weber committed
    DOC_HOME: ${CI_PROJECT_DIR}/build
Justin Weber's avatar
Justin Weber committed
  script:
Justin Weber's avatar
Justin Weber committed
    - aws s3 sync ${DOC_HOME}/docs s3://exa-doc/user-manual/latest --delete
    - aws s3 sync ${DOC_HOME}/picvva s3://exa-doc/pic-vva/latest --delete
Justin Weber's avatar
Justin Weber committed
  dependencies:
    - docs:userguide
  except:
    - schedules
  tags:
    - docker
Justin Weber's avatar
Justin Weber committed
  stage: deploy
Justin Weber's avatar
Justin Weber committed