diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8cfc84c..8286b51 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 '/var/www/musiclist.danielcortes.xyz/server/deploy.sh' + - ssh deployer@142.93.158.54 'sh /var/www/musiclist.danielcortes.xyz/server/deploy.sh' diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..ae2bad7 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,8 @@ +# If venv doesnt exists +[ -d venv/ ] && python3 -m venv venv +# Activate venv +. venv/bin/activate +# Install all requirements +pip install -r requirements.txt +# Restart systemctl unit +sudo /bin/systemctl restart musiclist \ No newline at end of file