Add automatic deployment

This commit is contained in:
Jan Tuomi
2017-09-14 15:55:39 +03:00
parent b16bef536e
commit 41c9aab595
+17
View File
@@ -11,6 +11,7 @@ variables:
stages:
- test
- lint
- deploy
test:
stage: test
@@ -37,3 +38,19 @@ eslint:
script:
- npm install -g eslint
- eslint .
deploy:
stage: deploy
environment:
name: dev
url: http://web.sik.party
only:
- develop
script:
- python -V
- pip install -r requirements.txt
- cp sikweb/settings-sample.py sikweb/default_settings.py
- cp sikweb/.ci-settings.py sikweb/settings.py
- python manage.py migrate --noinput
- python manage.py createdefaultadmin
- python manage.py runserver 0.0.0.0:8080