Files
plantillaNuxtAuthentikProxy/.gitea/workflows/build-and-deploy.yml
josedario87 c794a883fa Initial commit: Nuxt 4 template with Authentik OAuth
- Add Nuxt 4 application structure
- Add Docker and docker-compose configuration
- Add Gitea Actions CI/CD workflow
- Add Claude Code hooks for action monitoring
2025-10-12 17:09:21 -06:00

63 lines
2.4 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, master ]
jobs:
#───────────────── build & push ─────────────────
build:
runs-on: docker
env:
REG: ${{ vars.REGISTRY_URL }}
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 plantilla-nuxt-authentik
run: |
cd nuxt4
docker build -t $REG/plantilla-nuxt-authentik:${{ github.sha }} -t $REG/plantilla-nuxt-authentik:latest .
docker push $REG/plantilla-nuxt-authentik:${{ github.sha }}
docker push $REG/plantilla-nuxt-authentik:latest
#───────────────── deploy ─────────────────
deploy:
needs: build
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
- name: Login to registry
run: docker login ${{ vars.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }}
- name: Info about environment
run: |
echo " Deploying Plantilla Nuxt + Authentik Proxy"
echo " Domain: ${{ vars.APP_DOMAIN }}"
echo " Network: principal"
- name: Pull fresh images used in compose
run: docker compose pull
- name: Clean up stack
run: docker compose --project-name plantilla-nuxt-authentik down
- name: Update stack
run: docker compose --project-name plantilla-nuxt-authentik up -d --remove-orphans --wait