- Add uptime-kuma, searxng, and wallabag Docker services with Postgres integration for wallabag - Add nginx reverse proxy location blocks for /uptime-kuma/, /searxng/, /wallabag/ in both prod and dev templates - Update entrypoint.sh envsubst to include new HOST/PORT vars - Add Vite dev proxy entries for all three services - Update gitea-runner config: add self-hosted label and allow all volumes - Add Gitea CI/CD workflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-backend:
|
|
name: Build & Test Backend
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: backend/go.mod
|
|
cache-dependency-path: backend/go.sum
|
|
|
|
- name: Build
|
|
run: cd backend && go build ./...
|
|
|
|
- name: Test
|
|
run: cd backend && go test ./...
|
|
|
|
build-frontend:
|
|
name: Build Frontend
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: vue/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: cd vue && npm ci
|
|
|
|
- name: Build
|
|
run: cd vue && npm run build
|
|
|
|
deploy:
|
|
name: Deploy
|
|
runs-on: self-hosted
|
|
needs: [build-backend, build-frontend]
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
steps:
|
|
- name: Pull latest & redeploy
|
|
run: |
|
|
cd /home/adamf/Coding/web_server
|
|
git pull origin main
|
|
docker compose up --build -d
|