Skip to content

ci: remove redundant workflows uncovered by post-refactor survey - #249

Open
jonathanhhb wants to merge 1 commit into
mainfrom
ci/gha-cleanup-redundant-workflows
Open

ci: remove redundant workflows uncovered by post-refactor survey#249
jonathanhhb wants to merge 1 commit into
mainfrom
ci/gha-cleanup-redundant-workflows

Conversation

@jonathanhhb

Copy link
Copy Markdown
Collaborator

Summary

Post-refactor cleanup. Two workflows became redundant once the RAG/CI reorganization landed (#241, #246). Deleting them: 6 workflows → 5, and eliminates two spots where CI was doing the same work twice.

Changes

1. Delete .github/workflows/mkdocs-pr.yml

Duplicated github-actions.yml's docs tox matrix entry — both ran mkdocs build on every PR. Only unique bit was uploading the built site as a 14-day preview artifact, but the canonical render location is laser.idmod.org/laser-generic/tutorials/ (updated on every main-push per #246), so the per-PR preview artifact is marginal.

2. Remove docs-deploy job from release-publish.yml

Before we had the Execute Notebooks + artifact overlay pattern, releases had a bespoke docs deploy that did in-band notebook execution (MKDOCS_EXECUTE_NOTEBOOKS=true) followed by mkdocs gh-deploy. That's now fully covered by mkdocs-ghp.yml, which fires when the release commit hits main and deploys with the fresh executed_nbs artifact.

Effect on a typical release:

  • Before: merge release-prep to main → mkdocs-ghp deploys (fresh artifact) → dispatch release-publish → release-publish's docs-deploy re-deploys with in-band execution (~30 min slower, same output)
  • After: merge release-prep to main → mkdocs-ghp deploys (fresh artifact) → dispatch release-publish → wheels + PyPI + GH release only

Also fixed needs: [build, docs-deploy] in the release and publish jobs down to needs: [build]. Those jobs shouldn't gate on a docs deploy; the docs deploy is a main-branch concern, not a release-artifact concern.

Left an inline comment in the workflow explaining where the docs deploy happens now so future maintainers don't reintroduce it.

What stays

Four workflows remain, each with a distinct role:

Workflow Role
github-actions.yml pytest matrix + docs matrix entry (validates mkdocs build) + ruff / typing
execute-notebooks.yml Produces the canonical executed_nbs artifact
build-combined-doc.yml Consumes artifact → produces the RAG corpus in laser-mcp
mkdocs-ghp.yml Consumes artifact → deploys the docs site to GitHub Pages
release-publish.yml Wheels + PyPI + GH Release (with the docs-deploy job removed)

Test plan

  • YAML validity confirmed
  • Next release should still produce wheels + PyPI + GH release correctly; verified by inspection since the workflow structure only removed a job and dropped it from needs:
  • Next release should still update the docs site — but via mkdocs-ghp on the release-commit push, which we already know works (last verified after ci(docs-site): overlay executed_nbs artifact before mkdocs build #246)

Two workflows became redundant after the RAG/CI reorganization landed
(#241, #246). Cleaning them up to reduce cognitive load — 6 workflows
became 5, and the two removals eliminate double-work that was silently
happening on every release.

## 1. Delete .github/workflows/mkdocs-pr.yml

This workflow ran `mkdocs build` on PRs to validate the docs site
still built. That's already covered by github-actions.yml's `docs`
tox matrix entry, which runs `tox -e docs` (which itself runs
`mkdocs build`) on every PR. Both workflows produced the same
validation signal.

Only unique bit in mkdocs-pr.yml was the site-preview artifact
upload (14-day retention). Given the docs site is the canonical
render location (laser.idmod.org/laser-generic/tutorials/) and gets
updated on every main-push, the value of a per-PR downloadable
site preview is marginal. Removed.

## 2. Remove docs-deploy job from release-publish.yml

The `docs-deploy` job in release-publish.yml did:
  - Fresh in-band notebook execution (MKDOCS_EXECUTE_NOTEBOOKS=true)
  - mkdocs gh-deploy --force --dirty

That was necessary before we had the Execute Notebooks + artifact
overlay pattern. Now that path is fully covered by mkdocs-ghp.yml,
which fires automatically when the release commit hits main and
consumes the executed_nbs artifact produced by Execute Notebooks.
The release-time deploy was therefore double-work — mkdocs-ghp
already deployed a fresh-artifact-backed site before
release-publish's dispatch even ran, and docs-deploy then re-deployed
with in-band execution (~30 min slower).

Also updated `needs: [build, docs-deploy]` in the `release` and
`publish` jobs to just `needs: [build]` — those jobs shouldn't gate
on a docs deploy at all. Whether the docs site deploys or not is a
main-branch concern, not a release-artifact concern.

Left a comment in the workflow explaining where the docs deploy
happens now so future maintainers don't add it back.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes redundant CI workflows/jobs after the docs/RAG CI refactor, so the release workflow focuses only on release artifacts while docs deployment remains handled by the dedicated MkDocs deploy pipeline.

Changes:

  • Deletes the PR-only MkDocs build workflow (mkdocs-pr.yml) that duplicated existing docs validation.
  • Removes the docs-deploy job from release-publish.yml and updates downstream needs: to depend only on build.
  • Adds an inline note in release-publish.yml documenting where docs deployment happens now.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/release-publish.yml Drops redundant docs deployment from the release workflow and unblocks release/publish from depending on it.
.github/workflows/mkdocs-pr.yml Deletes a redundant PR docs-build workflow that overlapped with the main CI docs validation path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JSchripsema-IDM

Copy link
Copy Markdown
Collaborator

Generally looks good, though I think it would be good to retain the artifact upload bit so the output can be viewed (it's not uncommon for the build to be green but for text to be rendered differently than is desired).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants