Files
marathon-todo/.gitea/workflows/redeploy-compose.yml
Oleksandr Shuryha 6b02571d50
Some checks failed
Redeploy Docker Compose / redeploy (push) Failing after 2s
Switch Gitea deploy workflow to local runner mode
2026-03-26 19:03:48 +01:00

34 lines
804 B
YAML

name: Redeploy Docker Compose
on:
push:
branches:
- main
jobs:
redeploy:
runs-on: ubuntu-latest
env:
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
DEPLOY_BRANCH: main
steps:
- name: Validate deployment path
shell: bash
run: |
set -euo pipefail
if [ -z "${DEPLOY_PATH:-}" ]; then
echo "Missing required secret: DEPLOY_PATH"
exit 1
fi
- name: Redeploy locally on runner host
shell: bash
run: |
set -euo pipefail
cd "$DEPLOY_PATH"
git fetch origin "$DEPLOY_BRANCH"
git checkout "$DEPLOY_BRANCH"
git pull --ff-only origin "$DEPLOY_BRANCH"
docker compose pull
docker compose up -d --build --remove-orphans