Skip to content

Merge pull request #45 from pythontanzania/fh/update-sponsor-page #21

Merge pull request #45 from pythontanzania/fh/update-sponsor-page

Merge pull request #45 from pythontanzania/fh/update-sponsor-page #21

Workflow file for this run

name: scp files
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: "*"
target: "${{ secrets.TARGET }}"
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
cd ${{ secrets.TARGET }}
source venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
# python manage.py collectstatic -v 2 --noinput
deactivate
echo ${{ secrets.PASSWORD }} | sudo -S systemctl restart pycon.service
echo ${{ secrets.PASSWORD }} | sudo -S systemctl reload nginx