cambios en permisos #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |