Files
pbt/.gitea/workflows/deploy.yml
T
zisco ac88252744
Deploy PBT / deploy (push) Failing after 10s
Deploy rsync
2026-09-09 19:13:28 +02:00

44 lines
1.0 KiB
YAML

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: rsync installieren
run: apt-get update && apt-get install -y rsync
- 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
'