From 98c5089c3e1df3e2dde3d41509fc16879ff197dc Mon Sep 17 00:00:00 2001 From: Kerboul Date: Mon, 9 Dec 2024 23:38:09 +0000 Subject: [PATCH] Update 2 files - /.gitea/workflows/test.yml - /.gitlab-ci.yml --- .gitea/workflows/test.yml | 32 -------------------------------- .gitlab-ci.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 .gitea/workflows/test.yml create mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml deleted file mode 100644 index 464d7fd..0000000 --- a/.gitea/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Déploiement du site - -on: - push: - branches: - - main - -jobs: - backend-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Test SSH connection - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USER }} - password: ${{ secrets.SSH_PASSWORD }} - script: | - echo "CONNEXION REUSSIE" - - - name: Update backend - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USER }} - password: ${{ secrets.SSH_PASSWORD }} - script: | - ssh mikoshi "cd /home/timelapse/backend && git pull origin main && docker restart timelapse-api" \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..315ce71 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +stages: + - deploy + +deploy_timelapse: + stage: deploy + script: + - ssh kerboul@172.17.0.1 "cd /home/kerboul/scripts/timelapse && ./update_timelapse.sh" + only: + - main