-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (28 loc) · 866 Bytes
/
main.yml
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
28
29
30
31
32
name: Actualizar en VPS
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout del repositorio
uses: actions/checkout@v2
- name: Conectar al VPS y actualizar
uses: appleboy/ssh-action@master
with:
host: 207.244.233.96
username: ${{ secrets.VPS_USERNAME }}
password: ${{ secrets.VPS_PASSWORD }}
script: |
cd kiki
git pull origin main
docker-compose up -d
docker exec -it kiki-db psql -U $SQL_USER -c "CREATE DATABASE $SQL_DATABASE;"
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
sudo service gunicorn restart
sudo service nginx restart