Create deploy.yml

🚀 Add GitHub Action for auto-deploy to Hetzner
This commit is contained in:
Oliver 2025-07-14 10:31:45 +02:00 committed by GitHub
parent 1797f687cd
commit 79bdb57e98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

27
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: 🚀 Deploy to Hetzner
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.0
with:
host: 88.99.209.207
username: oliver
key: ${{ secrets.HETZNER_SSH_KEY }}
port: 22
script: |
cd rss-news
git pull origin main
source .venv/bin/activate
pip install -r requirements.txt
sudo systemctl restart rss-app