Merge pull request #716 from inventaire-des-orgues/journaux #567
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: remote ssh command | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
script: | | |
cd /var/www/portail | |
source /var/www/pythonenv/bin/activate | |
git pull | |
pip3 install -r requirements.txt | |
python manage.py collectstatic --noinput | |
python manage.py migrate | |
sudo systemctl restart nginx | |
sudo systemctl restart gunicorn |