@@ -4,6 +4,9 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
HOME: /root
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -16,15 +19,15 @@ jobs:
|
||||
|
||||
- name: SSH-Key als Datei anlegen
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
printf '%s\n' "${{ secrets.PBT_DEPLOY_KEY }}" > ~/.ssh/pbt_deploy_key
|
||||
chmod 600 ~/.ssh/pbt_deploy_key
|
||||
ssh-keyscan -H pbt >> ~/.ssh/known_hosts
|
||||
mkdir -p /root/.ssh
|
||||
printf '%s\n' "${{ secrets.PBT_DEPLOY_KEY }}" > /root/.ssh/pbt_deploy_key
|
||||
chmod 600 /root/.ssh/pbt_deploy_key
|
||||
ssh-keyscan -H pbt >> /root/.ssh/known_hosts
|
||||
|
||||
- name: Dateien auf die pbt-LXC syncen
|
||||
run: |
|
||||
rsync -avz --delete \
|
||||
-e "ssh -i ~/.ssh/pbt_deploy_key -o UserKnownHostsFile=~/.ssh/known_hosts" \
|
||||
-e "ssh -i /root/.ssh/pbt_deploy_key -o UserKnownHostsFile=/root/.ssh/known_hosts" \
|
||||
--exclude '.git' \
|
||||
--exclude '.gitea' \
|
||||
--exclude 'venv' \
|
||||
@@ -33,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Abhängigkeiten installieren & Service neu starten
|
||||
run: |
|
||||
ssh -i ~/.ssh/pbt_deploy_key -o UserKnownHostsFile=~/.ssh/known_hosts deploy@pbt '
|
||||
ssh -i /root/.ssh/pbt_deploy_key -o UserKnownHostsFile=/root/.ssh/known_hosts deploy@pbt '
|
||||
set -e
|
||||
cd /opt/pbt
|
||||
python3 -m venv venv
|
||||
|
||||
Reference in New Issue
Block a user