name: Build & Deploy on: push: branches: [master] env: REGISTRY: gitea.lan IMAGE: gitea.lan/shaz/le-site-de-ma-mamounette jobs: build-and-push: runs-on: homelab steps: - name: Checkout 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 }} - 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 compose -f /srv/ssd/stacks/moulin/docker-compose.yml up -d --pull always