name: waterfall-wiki CI and deployment on: push: branches: [main] paths: - 'apps/waterfall-wiki/**' - '.gitea/workflows/waterfall-wiki.yml' - 'Dockerfile' - 'compose.yml' - 'scripts/deploy.sh' - 'scripts/infra.sh' - 'scripts/auth-admin.sh' - 'scripts/integration.sh' - 'pnpm-workspace.yaml' pull_request: paths: - 'apps/waterfall-wiki/**' - '.gitea/workflows/waterfall-wiki.yml' - 'Dockerfile' - 'compose.yml' - 'scripts/deploy.sh' - 'scripts/infra.sh' - 'scripts/auth-admin.sh' - 'scripts/integration.sh' - 'pnpm-workspace.yaml' workflow_dispatch: jobs: verify-and-deploy: runs-on: ces-control timeout-minutes: 45 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Validate configuration run: docker compose --env-file apps/waterfall-wiki/.env.example config --quiet - name: Build and verify waterfall-wiki run: docker build --target integration -t "waterfall-wiki-tests:${{ gitea.sha }}" . - name: Verify retained character originals run: docker run --rm --entrypoint node "waterfall-wiki-tests:${{ gitea.sha }}" --test tests/character-pack.test.mjs - name: Build runtime run: docker build --target runtime -t "waterfall-wiki:${{ gitea.sha }}" . - name: Integration stack env: WATERFALL_WIKI_IMAGE: waterfall-wiki:${{ gitea.sha }} WATERFALL_WIKI_TEST_IMAGE: waterfall-wiki-tests:${{ gitea.sha }} run: bash scripts/integration.sh - name: Deploy waterfall-wiki if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch') run: bash scripts/deploy.sh "${{ gitea.sha }}"