Add: CI
This commit is contained in:
20
.gitea-ci.yml
Normal file
20
.gitea-ci.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user