fix: presenation and tutorial descrition #8
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: scp files | |
on: [push] | |
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 |