Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
name: Keep caches warm
|
|
|
|
# **What it does**:
|
|
# Makes sure the caching of ./node_modules and ./.next is kept warm
|
|
# for making other pull requests faster.
|
|
# We also use this workflow to precompute other things so that the
|
|
# actions cache is warmed up with data available during deployment
|
|
# actions. When you use actions/cache within a run on `main`
|
|
# what gets saved can be used by other pull requests. But it's
|
|
# also so that when we make production deployments,
|
|
# we can just rely on the cache to already be warmed up.
|
|
# **Why we have it**:
|
|
# A PR workflow that depends on caching can't reuse a
|
|
# cached artifact acorss PRs unless it also runs on `main`.
|
|
# **Who does it impact**: Docs engineering, open-source engineering contributors.
|
|
|
|
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- 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/slack-alert
|
|
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
|
|
with:
|
|
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
|
|
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
|