~sirodoht/mataroa

ref: e41ccd0181757f64258e9cad93ade228687cb614 mataroa/deploy.sh -rwxr-xr-x 710 bytes
e41ccd01Theodore Keloglou add dark mode 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/local/bin/bash

set -e
set -x

# push origin
git push origin master

# make sure tests pass
source venv/bin/activate
python manage.py test
deactivate

# pull changes on server
ssh roa@95.217.177.163 'cd mataroa && git pull'

# sync requirements
ssh roa@95.217.177.163 'cd mataroa && source venv/bin/activate && pip install -r requirements.txt'

# collect static
ssh roa@95.217.177.163 'cd mataroa && source venv/bin/activate && python manage.py collectstatic --noinput'

# migrate database
ssh roa@95.217.177.163 'cd mataroa && source venv/bin/activate && source .envrc && python manage.py migrate'

# reload
ssh roa@95.217.177.163 'cd mataroa && source venv/bin/activate && uwsgi --reload mataroa.pid'