Skip to content
.gitlab-ci.yml 1.13 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
    - sphinx-build -b html docs/picvva/ build
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']
  image: amazon/aws-cli:latest
  variables:
    DOC_HOME: ${CI_PROJECT_DIR}/doc-staging
  script:
    - mv webroot/docs_html ${DOC_HOME}
    - aws s3 sync ${DOC_HOME} s3://exa-doc/user-manual/$CI_COMMIT_TAG --acl public-read
  dependencies:
    - docs:userguide
  except:
    - schedules
  only:
    - tags
  tags:
    - docker
Justin Weber's avatar
Justin Weber committed
  stage: deploy
Justin Weber's avatar
Justin Weber committed