Create deploy.yml
🚀 Add GitHub Action for auto-deploy to Hetzner
This commit is contained in:
parent
1797f687cd
commit
79bdb57e98
1 changed files with 27 additions and 0 deletions
27
.github/workflows/deploy.yml
vendored
Normal file
27
.github/workflows/deploy.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue