From 4d22530b10f04c74a7a38df1cabe92ea1ce45d33 Mon Sep 17 00:00:00 2001 From: Daniel Schubert Date: Wed, 13 Feb 2019 11:40:14 +0100 Subject: [PATCH] deployment automatisierung --- .deploy-ignore | 10 ++++++++++ deploy.sh | 9 +++++++++ gitlab-ci.yml | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 .deploy-ignore create mode 100755 deploy.sh create mode 100644 gitlab-ci.yml diff --git a/.deploy-ignore b/.deploy-ignore new file mode 100644 index 0000000..25b1f9e --- /dev/null +++ b/.deploy-ignore @@ -0,0 +1,10 @@ +- .git +- node_modules +- bower* +- linux-kurs.sublime* +- .gitignore +- deploy.sh +- .deploy-ignore +- ssh-nutzer.txt +- *.lock +- *.yml \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..f1da9e0 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +deploy() { + git push && rsync -r --exclude-from=.deploy-ignore . pax2ero:/home/dany/www/schubertdaniel/linuxkurs +} + +deploy && echo "Deployed" || echo "### some error #####" + + diff --git a/gitlab-ci.yml b/gitlab-ci.yml new file mode 100644 index 0000000..d603cff --- /dev/null +++ b/gitlab-ci.yml @@ -0,0 +1,9 @@ +stages: + - deploy + +pages: + stage: deploy + script: + - mkdir /home/dany/hallo + only: + - master