Fix tests #60
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: Deploy to development server. | |
on: | |
push: | |
branches: | |
- 'development' | |
jobs: | |
deploy: | |
name: Deploy to DEVELOPMENT server | |
runs-on: ubuntu-latest | |
environment: development | |
# https://github.com/marketplace/actions/ssh-execute-commands | |
steps: | |
- name: Login remotely, pull and deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DEVELOPMENT_HOSTNAME }} | |
username: ${{ secrets.DEVELOPMENT_USERNAME }} | |
key: ${{ secrets.DEVELOPMENT_SECRET_KEY_SSH }} | |
port: 22 | |
script: | | |
source venv/bin/activate | |
cd /home/${{ secrets.DEVELOPMENT_USERNAME }}/OneSilaHeadless/ | |
git config pull.rebase false | |
git pull | |
pip install --upgrade pip | |
pip install -r requirements.txt --upgrade | |
cd OneSila | |
./manage.py migrate | |
./manage.py collectstatic --noinput | |
sudo supervisorctl restart hypercornctl | |
sudo chmod 777 /home/${{ secrets.DEVELOPMENT_USERNAME }}/hypercorn.sock | |
sudo supervisorctl restart huey |