Files
photo-server/.gitea/workflows/build.yml
josedario87 4c729866aa
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 27s
Configurar despliegue con Docker, Traefik y Authentik
- Agregar Dockerfile para build multi-stage con Node 20
- Configurar docker-compose.yml con Traefik y Authentik exteriorlvl2
- Crear workflow de Gitea Actions para CI/CD automático
- Configurar routers público (assets) y protegido (app + APIs)
- Documentar arquitectura y proceso de despliegue
2025-10-27 12:00:05 -06:00

41 lines
1.3 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: build-and-deploy
on:
push:
branches: [ main ]
jobs:
#───────────────── build, push & deploy (unified) ─────────────────
build-and-deploy:
runs-on: docker
env:
REG: gitea.nucleoriofrio.com/nucleo000
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: gitea.nucleoriofrio.com
username: nucleo000
password: 7bc7b2fcd283bd6a251bef3ede368b7f897c919d
- name: Build+push photo-server
run: |
docker build -t $REG/photo-server:${{ github.sha }} -t $REG/photo-server:latest .
docker push $REG/photo-server:${{ github.sha }}
docker push $REG/photo-server:latest
- name: Info about photos directory
run: |
echo " Photos directory expected at: /srv/photo-server/photos"
echo " Make sure it's mounted and accessible on the deployment host"
- name: Pull fresh images used in compose
run: docker compose pull
- name: Clean up stack
run: docker compose --project-name photo-server down
- name: Update stack
run: docker compose --project-name photo-server up -d --remove-orphans --wait