Skip to content

Merge pull request #796 from hackerspace-ntnu/795-fix-deploy-action-t… #218

Merge pull request #796 from hackerspace-ntnu/795-fix-deploy-action-t…

Merge pull request #796 from hackerspace-ntnu/795-fix-deploy-action-t… #218

Workflow file for this run

name: Deploy to Server
on:
push:
branches:
- master
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using key
uses: appleboy/[email protected]
with:
host: ${{ secrets.host }}
username: ${{ secrets.user }}
key: ${{ secrets.id }}
port: ${{ secrets.port }}
script: |
cd ${{ secrets.deploy_dir }}
. venv-prod/bin/activate
cd website
git pull
python -m pip install --upgrade pip
pip install --upgrade --force-reinstall -r prod_requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
python manage.py compilemessages
echo "${{ secrets.dingseboms_password }}" | sudo -S systemctl restart gunicorn