diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8286b51..03ef709 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,5 +25,5 @@ deploy: ## Sync the project to the deploy route - apt-get install rsync -y - rsync -rvz ./ deployer@142.93.158.54:/var/www/musiclist.danielcortes.xyz/server/ - - ssh deployer@142.93.158.54 'sh /var/www/musiclist.danielcortes.xyz/server/deploy.sh' + - ssh deployer@142.93.158.54 'cd /var/www/musiclist.danielcortes.xyz/server/; sh deploy.sh' diff --git a/deploy.sh b/deploy.sh index 391c32c..54043c5 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,3 +1,6 @@ +#!/usr/bin/env sh +set -eu + # If venv doesnt exists [ -d venv/ ] || python3 -m venv venv # Activate venv