From 801ab738d9318b3d398ba19eef643265280eabd3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Mar 2026 20:57:30 +0100 Subject: [PATCH] Add Gitea Actions deploy workflow Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/deploy.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..57baa7d --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,29 @@ +name: Deploy + +on: + push: + branches: + - main + workflow_dispatch: + +env: + COMPOSE_PROJECT: outline-sync + COMPOSE_FILE: docker-compose.yml + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Deploy with docker compose + run: | + echo "=== Deploying commit ${{ gitea.sha }} to ${{ gitea.ref_name }} ===" + docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" up --build -d --remove-orphans + + - name: Prune dangling images + run: docker image prune -f + + - name: Show running containers + run: docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" ps