Merge pull request #161 from HKN-UCSD/83-download-event-attendance #18
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 Ubuntu Server | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: SSH to Remote Server | |
uses: appleboy/ssh-action@master | |
with: | |
host: 52.9.199.73 | |
username: ubuntu | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: 22 | |
script: | | |
cd hkn-portal | |
git pull | |
source venv/bin/activate | |
python manage.py makemigrations | |
python manage.py migrate | |
cd frontend | |
npm run build | |
cd .. | |
python manage.py collectstatic --noinput | |
sudo service apache2 restart |