Fix: use tar pipe instead of rsync bc node:20 has no rsync
All checks were successful
Build and Deploy / deploy (push) Successful in 17s
All checks were successful
Build and Deploy / deploy (push) Successful in 17s
This commit is contained in:
parent
d1488b6006
commit
b5ab29256d
1 changed files with 4 additions and 5 deletions
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker context
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||
|
|
@ -24,15 +24,14 @@ jobs:
|
|||
APP_NAME: ${{ vars.APP_NAME }}
|
||||
DOMAIN: ${{ vars.DOMAIN }}
|
||||
run: |
|
||||
# Variablen setzen
|
||||
SERVER="root@194.163.164.113"
|
||||
DEPLOY_PATH="/opt/apps/${APP_NAME}"
|
||||
|
||||
# Verzeichnis erstellen
|
||||
# Verzeichnis vorbereiten
|
||||
ssh $SERVER "mkdir -p ${DEPLOY_PATH}"
|
||||
|
||||
# Gesamtes Projekt kopieren (außer .git)
|
||||
rsync -avz --exclude '.git' --exclude '.forgejo' ./ $SERVER:${DEPLOY_PATH}/
|
||||
# Alle Dateien kopieren (tar verwenden für Effizienz)
|
||||
tar --exclude='.git' --exclude='.forgejo' -czf - . | ssh $SERVER "cd ${DEPLOY_PATH} && tar -xzf -"
|
||||
|
||||
# Anwendung deployen
|
||||
ssh $SERVER "cd ${DEPLOY_PATH} && docker compose up -d --build --force-recreate"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue