diff options
| author | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-03-14 14:39:50 +0200 |
|---|---|---|
| committer | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-03-14 14:39:50 +0200 |
| commit | 1d4063812d4e007ce290f1d4ed300ac8b42c3d7d (patch) | |
| tree | ff9863fcaf4fa72db22901c2234abc3d663a0f38 /.gitlab-ci.yml | |
| parent | 277f4d63a11d02613d5030560a37f38d681fc82c (diff) | |
fix gitlab-ci x10
Diffstat (limited to '.gitlab-ci.yml')
| -rw-r--r-- | .gitlab-ci.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b46ecb1..6f4fbff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,9 +19,15 @@ deploy: stage: deploy image: ubuntu:22.04 before_script: - - apt-get update && apt-get install -y sshpass docker.io + - apt-get update && apt-get install -y openssh-client + - mkdir -p ~/.ssh + - echo "$SSH_PRIVATE_KEY" | base64 -d > ~/.ssh/id_ed25519 + - chmod 600 ~/.ssh/id_ed25519 + - eval "$(ssh-agent -s)" + - ssh-add ~/.ssh/id_ed25519 + - ssh-keyscan -H 192.168.0.171 >> ~/.ssh/known_hosts script: - - sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no arkadii@192.168.0.171 " + - ssh arkadii@192.168.0.171 " docker stop $IMAGE_NAME || true && docker rm $IMAGE_NAME || true && docker build -t $IMAGE_NAME:$IMAGE_TAG /home/arkadii/artberry_backend && |
