All checks were successful
Deploy / deploy (push) Successful in 12s
- outline_sync.py: write compare results to /tmp/compare_results.json with full doc maps for parent-chain lookup during copy operations - webui.py: /review page with remote-only, local-only, conflict tables; /review/content endpoint to fetch doc text from either instance; /review/apply endpoint for copy_to_local, copy_to_remote, keep_remote, keep_local, skip actions; "Compare Instances" button on dashboard; "Review Differences" link shown after compare completes - entrypoint.sh: include local block in generated settings.json - docker-compose.yml: pass LOCAL_OUTLINE_URL/TOKEN/HOST env vars - deploy.yml: write LOCAL_* secrets to .env file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
inputs:
|
|
reason:
|
|
description: "Reason for manual deploy"
|
|
required: false
|
|
default: "manual"
|
|
|
|
env:
|
|
COMPOSE_PROJECT: outline-sync
|
|
COMPOSE_FILE: docker-compose.yml
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Bump patch version
|
|
if: github.event_name != 'workflow_dispatch'
|
|
run: |
|
|
VERSION=$(cat VERSION)
|
|
MAJOR=$(echo $VERSION | cut -d. -f1)
|
|
MINOR=$(echo $VERSION | cut -d. -f2)
|
|
PATCH=$(echo $VERSION | cut -d. -f3)
|
|
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
|
|
echo $NEW_VERSION > VERSION
|
|
echo "APP_VERSION=$NEW_VERSION" >> $GITHUB_ENV
|
|
git config user.email "ci@domverse-berlin.eu"
|
|
git config user.name "CI"
|
|
git add VERSION
|
|
git commit -m "chore: bump version to $NEW_VERSION [skip ci]"
|
|
git push
|
|
|
|
- name: Write .env
|
|
run: |
|
|
cat > .env << EOF
|
|
OUTLINE_URL=http://outline:3000
|
|
OUTLINE_TOKEN=${{ secrets.OUTLINE_TOKEN }}
|
|
LOCAL_OUTLINE_URL=${{ secrets.LOCAL_OUTLINE_URL }}
|
|
LOCAL_OUTLINE_TOKEN=${{ secrets.LOCAL_OUTLINE_TOKEN }}
|
|
LOCAL_OUTLINE_HOST=${{ secrets.LOCAL_OUTLINE_HOST }}
|
|
TS_AUTHKEY=${{ secrets.TS_AUTHKEY }}
|
|
EOF
|
|
|
|
- name: Deploy with docker compose
|
|
run: |
|
|
APP_VERSION=${APP_VERSION:-$(cat VERSION)}
|
|
echo "=== Deploying $APP_VERSION (commit ${{ gitea.sha }}) to ${{ gitea.ref_name }} ==="
|
|
docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" build --build-arg APP_VERSION=$APP_VERSION
|
|
docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" up -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
|