Skip to content

Commit

Permalink
Generate .egg and move that to the server
Browse files Browse the repository at this point in the history
  • Loading branch information
mzfr authored and mzfr committed Jun 6, 2020
1 parent 34b9bfe commit bc9595e
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Generate .egg
run: python setup.py bdist_egg

- name: Copy file via scp
uses: appleboy/scp-action@master
env:
Expand All @@ -19,25 +31,5 @@ jobs:
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
with:
source: "."
target: "/opt/tanner"

- name: Install dependencies
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
script: |
python -m pip install --upgrade pip
pip3 install -r requirements.txt

- name: Starting tanner
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
script: supervisorctl restart service
source: "/dist/*.egg"
target: "/opt/tanner/dist"

0 comments on commit bc9595e

Please sign in to comment.