test local clone
Some checks failed
Build and Deploy Container / build_and_deploy (push) Failing after 21s
Some checks failed
Build and Deploy Container / build_and_deploy (push) Failing after 21s
This commit is contained in:
@@ -52,14 +52,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Copy entire repository to target host
|
- name: Copy entire repository to target host (scp, overwrite)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Create target directory and stream full repo via tar over ssh (includes .git)
|
set -euo pipefail
|
||||||
ssh $TARGET_USER@$TARGET_HOST "mkdir -p $APP_DIR"
|
# Ensure target directory exists
|
||||||
echo "Streaming repository to $TARGET_HOST:$APP_DIR"
|
ssh -o BatchMode=yes -i ~/.ssh/id_ed25519 $TARGET_USER@$TARGET_HOST "mkdir -p $APP_DIR"
|
||||||
# Use pax-compatible tar to preserve permissions; gzip for transfer
|
echo "Copying repository files to $TARGET_HOST:$APP_DIR via scp (overwrites existing files)"
|
||||||
tar -czf - . | ssh $TARGET_USER@$TARGET_HOST "tar -xzf - -C $APP_DIR"
|
# Enable dotglob so hidden files are included in the glob
|
||||||
|
shopt -s dotglob
|
||||||
|
# Copy all files and directories in the repo root to the remote host
|
||||||
|
scp -r -o BatchMode=yes -i ~/.ssh/id_ed25519 ./* $TARGET_USER@$TARGET_HOST:$APP_DIR/
|
||||||
|
echo "Copy finished"
|
||||||
|
|
||||||
- name: Build container on target host
|
- name: Build container on target host
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user