This commit is contained in:
ITQ
2025-03-01 02:19:36 +03:00
parent c643e8f05e
commit 609d92d95f
+4 -3
View File
@@ -62,9 +62,10 @@ deploy:
- apk add --no-cache openssh-client
script:
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- printf "%s" "$SSH_PRIVATE_KEY_BASE64" | base64 -d -i > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config && chmod 600 ~/.ssh/config
- echo "$SSH_PRIVATE_KEY_BASE64" | base64 -d > ~/.ssh/id_rsa && chmod 400 ~/.ssh/id_rsa
- ssh-agent sh -c "ssh-add ~/.ssh/id_rsa"
- ssh-keyscan -H "$SSH_HOST"
- scp -C -r infrastructure/ compose.yaml "$SSH_ADDRESS":~/deploy/
- ssh "$SSH_ADDRESS" << 'EOF'
set -e