Skip to content

detache deploy from action #7

detache deploy from action

detache deploy from action #7

Workflow file for this run

name : Deploy Panel App
concurrency: production
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
name: Deploy Panel App
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up SSH
run: |
mkdir -p ~/.ssh/
echo "${{secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 -H ${{secrets.PROD_IP}} >> ~/.ssh/known_hosts
- name: Deploy to Server
run: |
ssh ubuntu@${{secrets.PROD_IP}} << 'EOF'
# Arrêter le serveur Panel
pkill -f 'panel serve'
cd ${{vars.PROD_PATH}}
git pull
git lfs pull
nohup panel serve src/pollen_forecast/app.py --address 0.0.0.0 --port 5006 --allow-websocket-origin=antoinetavant.fr &
EOF