Skip to content

fix pip install error caused by directory change #17

fix pip install error caused by directory change

fix pip install error caused by directory change #17

Workflow file for this run

name: gpxvis.com
on:
push:
branches: ['main']
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Stop GPX Vis and force-remove previous artifact
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
sudo systemctl stop ${{ secrets.DAEMON_NAME }}
sudo rm -rf ${{ secrets.DEPLOY_PATH }}
- name: Upload updated flask code
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
port: ${{ secrets.DEPLOY_PORT }}
source: "src"
target: ${{ secrets.DEPLOY_PATH }}
tar_tmp_path: ${{ secrets.TEMP_PATH }}
rm: false
timeout: 60s
- name: Install Flask dependencies and restart Flask
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
pip3 install -r ${{ secrets.DEPLOY_PATH }}/src/requirements.txt
touch ${{ secrets.DEPLOY_PATH }}/src/.env
echo APP_ADDRESS="${{ secrets.APP_ADDRESS }}" >> ${{ secrets.DEPLOY_PATH}}/src/.env
echo STRAVA_CLIENT_ID="${{ secrets.STRAVA_CLIENT_ID }}" >> ${{ secrets.DEPLOY_PATH}}/src/.env
echo STRAVA_CLIENT_SECRET="${{ secrets.STRAVA_CLIENT_SECRET }}" >> ${{ secrets.DEPLOY_PATH}}/src/.env
sudo systemctl restart ${{ secrets.DAEMON_NAME }}