Skip to content

Commit b936b68

Browse files
committed
Add weekly scheduled workflow to rebuild docs site
The docs site embeds content from external repositories (e.g. the getting-started page is embedded from CAPI). This embedded content only updates when Netlify rebuilds the site, which only happens on push to main. If no PRs are merged for a while, the embedded content becomes stale. Add a weekly scheduled GitHub Actions workflow that triggers a Netlify build via a build hook. This ensures the docs site always has the latest content from embedded external sources. Maintainers need to: 1. Create a build hook in Netlify (Site settings > Build & deploy > Build hooks) 2. Add the hook URL as a GitHub Actions secret named NETLIFY_BUILD_HOOK Signed-off-by: Dong Ma <winterma.dong@gmail.com>
1 parent ea8f397 commit b936b68

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Weekly docs build
2+
3+
on:
4+
schedule:
5+
# Run every Monday at 8:00 UTC.
6+
- cron: "0 8 * * 1"
7+
workflow_dispatch: {}
8+
9+
# Remove all permissions from GITHUB_TOKEN except metadata.
10+
permissions: {}
11+
12+
jobs:
13+
trigger-netlify-build:
14+
runs-on: ubuntu-slim
15+
steps:
16+
- name: Trigger Netlify build
17+
run: curl -X POST -d '{}' "${{ secrets.NETLIFY_BUILD_HOOK }}"

0 commit comments

Comments
 (0)