Skip to content

Commit 0b7041e

Browse files
committed
Add automated theme update workflows
Add check-theme-updates.yml and publish-theme-change.yml workflows that delegate to reusable workflows in notebook-pub-theme. Update GITHUB_ACTIONS.md to document the new theme update workflows.
1 parent d1d7caa commit 0b7041e

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Check Theme Updates
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
check:
10+
uses: Arcadia-Science/notebook-pub-theme/.github/workflows/check-theme-updates.yml@main
11+
secrets: inherit
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Publish Theme Change
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ['_extensions/**']
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
uses: Arcadia-Science/notebook-pub-theme/.github/workflows/publish-theme-change.yml@main
12+
secrets: inherit

developer-docs/GITHUB_ACTIONS.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The publishing workflow described in the [Publishing Guide](PUBLISHING_GUIDE.md)
1111
This workflow creates the publication artifacts by aggregating all tagged versions of the `index.ipynb` notebook.
1212

1313
2. **A publishing workflow** (`.github/workflows/publish.yml`)
14-
14+
1515
This workflow renders the Quarto site from the publication artifacts and publishes the site to GitHub Pages.
1616

1717
## The version aggregation problem
@@ -51,3 +51,15 @@ The full development and publication process is described briefly below to help
5151

5252
4. **Publishing the publication**: When the author merges the build PR into `publish`, the `publish` workflow is triggered. It renders all of the versions and deploys the Quarto site to GitHub Pages.
5353

54+
## Theme updates
55+
56+
In addition to the content release workflows above, this repo has two workflows for automated theme updates:
57+
58+
1. **check-theme-updates.yml** — Checks daily for new theme releases and opens a PR if an update is available.
59+
60+
2. **publish-theme-change.yml** — When a theme update PR is merged, syncs the theme to `publish` and re-renders the site.
61+
62+
These are thin wrappers that delegate to reusable workflows in the [notebook-pub-theme](https://github.com/Arcadia-Science/notebook-pub-theme) repo. See [GITHUB_ACTIONS.md](https://github.com/Arcadia-Science/notebook-pub-theme/blob/main/GITHUB_ACTIONS.md) in that repo for details.
63+
64+
> [!NOTE]
65+
> If a content release PR is merged to `publish` and a theme update PR is merged to `main` within a short time window, both `publish.yml` and `publish-theme-change.yml` will run `quarto publish gh-pages` concurrently. This could cause one of the git pushes to `gh-pages` to fail with a non-fast-forward error. If this happens, the failed workflow can be re-run manually. This behavior has not been observed, but is a theoretical concern.

0 commit comments

Comments
 (0)