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