From 0a35e7abcfe0e09f986b286a68e7a38cd83ea086 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Wed, 15 May 2019 16:08:05 +0200 Subject: [PATCH] Auto Deploy to luppp.soundship.de --- .gitlab-ci.yml | 16 ++++++++++++++++ Makefile | 2 +- tasks.py | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..70d2c6e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +deploy: + before_script: + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + script: + - git submodule update --init + - pipenv install --system + - make publish + - make ssh_upload + + image: mc706/pipenv-3.7 diff --git a/Makefile b/Makefile index afa3161..6f185de 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ PUBLISHCONF=$(BASEDIR)/publishconf.py SSH_HOST=shoemaker.uberspace.de SSH_PORT=22 SSH_USER=gcrkng -SSH_TARGET_DIR=REPLACE +SSH_TARGET_DIR=/var/www/virtual/gcrkng/luppp.soundship.de DEBUG ?= 0 diff --git a/tasks.py b/tasks.py index d9ff921..96e1167 100644 --- a/tasks.py +++ b/tasks.py @@ -14,7 +14,7 @@ CONFIG = { 'deploy_path': 'output', # Remote server configuration 'production': 'gcrkng@shoemaker.uberspace.de:22', - 'dest_path': 'REPLACE', + 'dest_path': '/var/www/virtual/gcrkng/luppp.soundship.de', # Port for `serve` 'port': 8000, }