From 5a0711be126eae8e7f0efa23cea6fd4c138de803 Mon Sep 17 00:00:00 2001 From: Namonay Date: Thu, 27 Nov 2025 11:59:41 +0000 Subject: [PATCH] Add: CI --- .gitea-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .gitea-ci.yml diff --git a/.gitea-ci.yml b/.gitea-ci.yml new file mode 100644 index 0000000..c384a0f --- /dev/null +++ b/.gitea-ci.yml @@ -0,0 +1,20 @@ +stages: + - name: deploy + steps: + - name: Deploy via SSH + image: alpine:latest + commands: + - apk add --no-cache openssh-client git + + - mkdir -p ~/.ssh + - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + + - echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config + + - ssh $SSH_USER@$SSH_HOST << 'EOF' + cd /chemin/vers/ton/projet + git pull origin main + docker-compose down + docker-compose up -d --build + EOF