From a93444b0645b3bb2b074fd2c61ce4bf905a52a10 Mon Sep 17 00:00:00 2001 From: Felipe Martin Date: Mon, 7 Oct 2019 19:13:11 +0200 Subject: [PATCH] Deploy to Gitlab Pages ls !2 --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ Makefile | 5 ----- templates/_base.html | 2 +- tests/requirements.txt | 1 - tests/run.sh | 6 ------ tests/tests_deploy.py | 3 +-- 6 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 tests/requirements.txt delete mode 100644 tests/run.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..850ed04 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +image: archlinux/base:latest + +variables: + POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/poetry" + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +before_script: +- pacman -Syu python-pip nodejs npm make --noconfirm + +cache: + paths: + - .cache/pip + - .cache/poetry + +stages: +- deploy + +pages: + stage: deploy + script: + - pip install -r requirements.txt + - npm install + - make build + artifacts: + paths: + - public + only: + - master + +pages_test: + stage: deploy + script: + - pip install requests + - python -m unittest tests.tests_deploy + only: + - master diff --git a/Makefile b/Makefile index a1275e5..036d7b9 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,5 @@ build: watch: node_modules/gulp/bin/gulp.js sass:watch -deploy: - make build - rm -rf ${PWD}/public/.lektor - rclone sync --progress --create-empty-src-dirs ${PWD}/public fastmail:fmartingr.com - deploy_tests: bash tests/run.sh diff --git a/templates/_base.html b/templates/_base.html index 2ec4c86..2121b8d 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -33,7 +33,7 @@