Files
pbt/.gitea/workflows/deploy.yml
T
zisco f4c75526c3
Deploy PBT / deploy (push) Failing after 32s
Add workflow
2026-09-09 17:39:25 +02:00

41 lines
983 B
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: 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
'