Files
seguidorDeLotes/.gitea/workflows/build-and-deploy.yml
josedario87 fe2e400926
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 2m6s
Agregar mejoras PWA y unificar workflow a 1 job
- Agregar id único (/?app=lotes), launch_handler, handle_links y url_handlers
- Unificar workflow de 2 jobs (build + deploy) a 1 solo job
- Workaround para bug de Gitea que solo ejecuta el primer job
2025-10-17 03:38:24 -06:00

52 lines
2.0 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: [ master ]
jobs:
#───────────────── build, push & deploy (unified) ─────────────────
build-and-deploy:
runs-on: docker
env:
REG: ${{ vars.REGISTRY_URL }}
# Variables de entorno para docker-compose
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
NUXT_OAUTH_AUTHENTIK_CLIENT_ID: ${{ secrets.NUXT_OAUTH_AUTHENTIK_CLIENT_ID }}
NUXT_OAUTH_AUTHENTIK_CLIENT_SECRET: ${{ secrets.NUXT_OAUTH_AUTHENTIK_CLIENT_SECRET }}
NUXT_OAUTH_AUTHENTIK_SERVER_URL: ${{ vars.NUXT_OAUTH_AUTHENTIK_SERVER_URL }}
NUXT_OAUTH_AUTHENTIK_SERVER_URL_INTERNAL: ${{ vars.NUXT_OAUTH_AUTHENTIK_SERVER_URL_INTERNAL }}
NUXT_OAUTH_AUTHENTIK_REDIRECT_URL: ${{ vars.NUXT_OAUTH_AUTHENTIK_REDIRECT_URL }}
NUXT_PUBLIC_APP_URL: ${{ vars.NUXT_PUBLIC_APP_URL }}
NUXT_SESSION_PASSWORD: ${{ secrets.NUXT_SESSION_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build+push seguidor-lotes
run: |
cd nuxt4-app
docker build -t $REG/seguidor-lotes:${{ github.sha }} -t $REG/seguidor-lotes:latest .
docker push $REG/seguidor-lotes:${{ github.sha }}
docker push $REG/seguidor-lotes:latest
- name: Info about environment
run: |
echo " Deploying Seguidor de Lotes"
echo " Domain: seguidordelotes.nucleoriofrio.com"
echo " Network: principal"
- name: Pull fresh images used in compose
run: docker compose pull
- name: Clean up stack
run: docker compose --project-name seguidor-lotes down
- name: Update stack
run: docker compose --project-name seguidor-lotes up -d --remove-orphans --wait