Add Gitea CI/CD pipeline and shared infra setup
- docker-compose.yml: remove bundled postgres, connect to shared postgres via host-gateway:5433, add uploads volume, configurable port - .gitea/workflows/deploy.yml: Gitea Actions workflow for automated deploy on push to main - infra/README.md: step-by-step setup guide for NAS deployment (shared postgres, pgAdmin, act_runner, Gitea secrets) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
26
.gitea/workflows/deploy.yml
Normal file
26
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Deploy to NAS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Write .env
|
||||
run: printf 'DB_PASSWORD=%s\n' '${{ secrets.DB_PASSWORD }}' > ${{ secrets.DEPLOY_DIR }}/.env
|
||||
|
||||
- name: Build & Deploy
|
||||
run: |
|
||||
cp -r ${{ github.workspace }}/. ${{ secrets.DEPLOY_DIR }}/
|
||||
docker compose -f ${{ secrets.DEPLOY_DIR }}/docker-compose.yml up --build -d
|
||||
|
||||
- name: Health check
|
||||
run: |
|
||||
sleep 15
|
||||
curl -sf http://localhost:9050/healthz || exit 1
|
||||
Reference in New Issue
Block a user