From d508ede166e7ffefdf42c06d54702bb35e893fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sat, 30 May 2026 16:20:06 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20simplification=20workflow=20=E2=80=94=20c?= =?UTF-8?q?ommandes=20shell=20directes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 193f836..3a24293 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -9,7 +9,7 @@ env: IMAGE: gitea.lan/shaz/le-site-de-ma-mamounette jobs: - build-and-push: + build-push-deploy: runs-on: homelab steps: @@ -17,25 +17,16 @@ jobs: uses: actions/checkout@v4 - name: Login au registry Gitea - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ gitea.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.lan -u shaz --password-stdin - name: Build & push image - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ${{ env.IMAGE }}:latest - - deploy: - runs-on: homelab - needs: build-and-push - - steps: - - name: Pull nouvelle image & redémarrer run: | - docker pull ${{ env.IMAGE }}:latest + docker build -t ${{ env.IMAGE }}:latest . + docker push ${{ env.IMAGE }}:latest + + - name: Déployer sur le serveur + run: | + docker compose -f /srv/ssd/stacks/moulin/docker-compose.yml pull + docker compose -f /srv/ssd/stacks/moulin/docker-compose.yml up -d + docker compose -f /srv/ssd/stacks/moulin/docker-compose.yml up -d --pull always