From 00b097bddadd4f2dfe5a61daf09d1c81b3811168 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Oct 2018 10:17:50 +0700 Subject: [PATCH] .gitlab-ci.yml: Add GitLab CI to deploy pages --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..a2730a8f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,43 @@ +image: python:3.6 + +stages: + - build + - deploy + +variables: + XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/" + +.test_env: + stage: test + cache: + key: test + paths: + - .cache/pip + +.build_env: + extends: .test_env + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + paths: + - public + +build: + extends: .build_env + stage: build + before_script: + - pip install -r requirements.txt + script: + - ./.ci/build.sh + +pages: + stage: deploy + variables: + # Simulate the netlify production flag + CONTEXT: production + script: + - echo 'Nothing to do' + artifacts: + paths: + - public + only: + - master