Merge pull request #46168 from github/repo-sync #8485
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Keep caches warm | |
| # Main-branch runs warm node_modules, Next.js, remote JSON, and pageinfo caches that | |
| # pull request workflows and production deployments can reuse. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| keep-caches-warm: | |
| if: github.repository == 'github/docs-internal' || github.repository == 'github/docs' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ./.github/actions/node-npm-setup | |
| - uses: ./.github/actions/cache-nextjs | |
| - name: Build | |
| run: npm run build | |
| - uses: ./.github/actions/warmup-remotejson-cache | |
| if: github.repository == 'github/docs-internal' | |
| - uses: ./.github/actions/precompute-pageinfo | |
| if: github.repository == 'github/docs-internal' | |
| - uses: ./.github/actions/create-workflow-failure-issue | |
| id: create-failure-issue | |
| if: ${{ failure() && github.event_name != 'workflow_dispatch' }} | |
| with: | |
| token: ${{ secrets.DOCS_BOT_PAT_BASE }} | |
| - uses: ./.github/actions/slack-alert | |
| if: ${{ failure() && github.event_name != 'workflow_dispatch' }} | |
| with: | |
| slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} | |
| issue_url: ${{ steps.create-failure-issue.outputs.issue_url }} |