name: Remote development preview source sync on: push: branches: ['**'] paths: - 'apps/waterfall-wiki/**' - 'packages/brand/**' - 'pnpm-workspace.yaml' - 'scripts/preview/**' - '.gitea/workflows/preview.yml' concurrency: group: development-preview cancel-in-progress: false jobs: sync-source: # One preview slot follows one branch. Setup changes use an explicit refresh. if: gitea.ref == format('refs/heads/{0}', vars.PREVIEW_BRANCH || 'codex/unified-web') runs-on: ces-control timeout-minutes: 10 steps: - uses: actions/checkout@v4 with: fetch-depth: 1 - name: Initialize once, otherwise synchronize files only env: SOURCE_SHA: ${{ gitea.sha }} SOURCE_BRANCH: ${{ gitea.ref_name }} run: | if [ ! -s /opt/prompt-preview/fingerprint ]; then bash scripts/preview/init.sh "$PWD" waterfall-wiki-tests:6654a1456bdcef77d83ca84373dc36188e15bd12 fi bash scripts/preview/sync.sh "$PWD" "$SOURCE_SHA" "$SOURCE_BRANCH"