Files
aibook-fun/.gitea/workflows/deploy.yml
T

39 lines
1.1 KiB
YAML

# Rebuild + roll aibook.fun forward on any push to main.
# Runner: repo-registered act_runner on the aibook.fun droplet itself
# (co-located → local docker commands, no cross-host SSH needed).
#
# Repository secrets required (Settings → Actions → Secrets):
# (none — runner is on the droplet, has local root)
name: deploy
on:
push:
branches: [main]
paths:
- 'marketing-site/**'
- 'deploy/**'
- '.gitea/workflows/**'
workflow_dispatch:
concurrency:
group: aibook-fun-deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: aibook-fun-droplet
steps:
- name: Pull latest + rebuild + roll
run: |
set -euo pipefail
cd /opt/aibook_fun/repo
git fetch --prune origin
git reset --hard origin/main
docker build -t aibook-fun-marketing:v1 \
-f /opt/aibook_fun/repo/deploy/docker/Dockerfile \
/opt/aibook_fun/repo/marketing-site/
cd /opt/aibook_fun
docker compose up -d --remove-orphans
docker image prune -f --filter "dangling=true"