name: 'KB Troubleshooting Sync' on: push: branches: - master paths: - '.github/workflows/kb-troubleshooting-sync.yml' - 'apps/kb/**' workflow_dispatch: permissions: contents: read # Overlapping runs (e.g. two quick pushes to master) must not interleave: both # would see a new guide as "no row yet" and create a discussion for it. Queue, # never cancel — a run cancelled between creating a discussion and writing its # row would leave that discussion orphaned. concurrency: group: kb-troubleshooting-sync cancel-in-progress: false jobs: sync: runs-on: blacksmith-4vcpu-ubuntu-2404 env: KB_GITHUB_APP_ID: ${{ secrets.KB_GITHUB_APP_ID }} KB_GITHUB_APP_INSTALLATION_ID: ${{ secrets.KB_GITHUB_APP_INSTALLATION_ID }} KB_GITHUB_APP_PRIVATE_KEY: ${{ secrets.KB_GITHUB_APP_PRIVATE_KEY }} SUPABASE_URL: ${{ secrets.SEARCH_SUPABASE_URL }} SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SEARCH_SUPABASE_SERVICE_ROLE_KEY }} steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false sparse-checkout: | apps/kb packages patches - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 name: Install pnpm with: run_install: false - name: Use Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version-file: '.nvmrc' cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile - name: Fetch federated troubleshooting content run: pnpm run --filter kb fetch:federated-content - name: Sync new troubleshooting entries run: pnpm run --filter kb sync:troubleshooting-entries - name: Sync troubleshooting entry updates run: pnpm run --filter kb sync:troubleshooting-updates