Files
games/.gitea/workflows/deploy.yml
Ryan Hamamura 5a5cd08abb
All checks were successful
Deploy c4 / deploy (push) Successful in 59s
fix: use correct runner label in deploy workflow
The workflow was hanging because `ubuntu-latest` doesn't match the
Gitea Actions runner registered with the `games` label.
2026-02-19 11:20:42 -10:00

29 lines
666 B
YAML

name: Deploy c4
on:
push:
branches: [main]
env:
DEPLOY_DIR: /home/ryan/c4
jobs:
deploy:
runs-on: games
steps:
- uses: actions/checkout@v4
- name: Sync to deploy directory
run: |
mkdir -p $DEPLOY_DIR
rsync -a --delete --exclude 'data/' . $DEPLOY_DIR/
- name: Ensure data directory exists with correct ownership
run: |
mkdir -p $DEPLOY_DIR/data
# UID 5 / GID 60 = games:games in the container (debian:bookworm-slim)
sudo chown 5:60 $DEPLOY_DIR/data
- name: Rebuild and restart
run: cd $DEPLOY_DIR && docker compose up -d --build --remove-orphans