ci: ajout workflow build & deploy Gitea Actions
Build & Deploy / build-and-push (push) Has been cancelled
Build & Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-05-28 23:52:26 +02:00
parent 1411e6816d
commit a7bf63053d
2 changed files with 42 additions and 1 deletions
+41
View File
@@ -0,0 +1,41 @@
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: ubuntu-latest
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: ubuntu-latest
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