diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 00000000..dbf7a9a8 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,79 @@ +name: release + +# Builds and deploys the production environment on `v*` tag push. +# Runs on the self-hosted runner via Docker-out-of-Docker; images are +# tagged with the actual git tag (e.g. v1.0.0) so rollback is +# `TAG= docker compose -f docker-compose.prod.yml -p archiv-production up -d --wait` +# +# Production environment: +# - project name: archiv-production +# - host ports: backend 8080, frontend 3000 +# - profile: (none) — mailpit is excluded; real SMTP relay is used +# +# Required Gitea secrets: +# PROD_POSTGRES_PASSWORD +# PROD_MINIO_PASSWORD +# PROD_MINIO_APP_PASSWORD +# PROD_OCR_TRAINING_TOKEN +# PROD_APP_ADMIN_USERNAME (CRITICAL: see docs/DEPLOYMENT.md) +# PROD_APP_ADMIN_PASSWORD (CRITICAL: locked in on first deploy) +# MAIL_HOST +# MAIL_PORT +# MAIL_USERNAME +# MAIL_PASSWORD + +on: + push: + tags: + - "v*" + +env: + DOCKER_BUILDKIT: "1" + +jobs: + deploy-production: + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + + - name: Write production env file + run: | + cat > .env.production <