-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 986 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy to PythonAnywhere
on:
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Copy files via SCP
uses: appleboy/[email protected]
with:
host: ssh.pythonanywhere.com
username: eehnow
key: ${{ secrets.PYTHONANYWHERE_SSH_KEY }}
source: "."
target: "/home/eehnow/econet"
rm: true
- name: SSH and run deploy commands
uses: appleboy/[email protected]
with:
host: ssh.pythonanywhere.com
username: eehnow
key: ${{ secrets.PYTHONANYWHERE_SSH_KEY }}
script: |
source /home/eehnow/econet/bin/activate
cd /home/eehnow/econet
git pull origin develop
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
touch /var/www/eehnow_pythonanywhere_com_wsgi.py