Add workflow
Deploy PBT / deploy (push) Failing after 32s

This commit is contained in:
2026-09-09 17:39:25 +02:00
parent c295e7c676
commit f4c75526c3
12 changed files with 452 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
name: Deploy PBT
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SSH-Key laden
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.PBT_DEPLOY_KEY }}
- name: Host-Key vertrauen
run: ssh-keyscan -H pbt >> ~/.ssh/known_hosts
- name: Dateien auf die pbt-LXC syncen
run: |
rsync -avz --delete \
--exclude '.git' \
--exclude '.gitea' \
--exclude 'venv' \
--exclude '__pycache__' \
./ deploy@pbt:/opt/pbt/
- name: Abhängigkeiten installieren & Service neu starten
run: |
ssh deploy@pbt '
set -e
cd /opt/pbt
python3 -m venv venv
source venv/bin/activate
pip install -q -r requirements.txt
sudo /usr/bin/systemctl restart pbt
'