add known host #3
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 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: Add server to known hosts | |
run : | | |
mkdir -p ~/.ssh | |
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGlT1yCRZjWlfAIGFIsZOHVBmFHpyKYo83rNiHjHJkPr [email protected]" >> ~/.ssh/known_hosts | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Deploy to Server | |
run: | | |
ssh ubuntu@${{ secrets.PROD_IP }} << 'EOF' | |
# Arrêter le serveur Panel | |
pkill -f 'panel serve' | |
# Naviguer vers le répertoire de l'application | |
cd /home/ubuntu/pollen-forecast | |
# Mettre à jour le dépôt | |
git pull | |
# Redémarrer le serveur Panel | |
nohup panel serve src/pollen_forecast/app.py --address 0.0.0.0 --port 5006 --allow-websocket-origin=antoinetavant.fr & | |
EOF |