Skip to content

Fix publish_docs.yml: composite action was wiping ./src/ - #1276

Open
hschilling wants to merge 1 commit into
OpenMDAO:mainfrom
hschilling:fix-publish-docs-composite-checkout-order
Open

Fix publish_docs.yml: composite action was wiping ./src/#1276
hschilling wants to merge 1 commit into
OpenMDAO:mainfrom
hschilling:fix-publish-docs-composite-checkout-order

Conversation

@hschilling

Copy link
Copy Markdown
Member

Problem

workflow_dispatch runs of publish_docs.yml fail on the Build docs step with:

Error: An error occurred trying to start process '/usr/bin/bash' with working
directory '/home/runner/work/Aviary/Aviary/src'. No such file or directory

Root cause

The prepare_environment composite action (.github/actions/prepare_environment/action.yml lines 57-58) does its own actions/checkout@v6 with no path: argument. That unqualified checkout owns the workspace root and cleans it — wiping the ./src/ tree that the preceding "Checkout repository at target tag" step laid down.

Fix

Reorder the steps so prepare_docs_environment runs before the tag checkout:

  1. Checkout actions — sparse-checks out into ./actions/
  2. prepare_docs_environment — its internal checkout lands in the root (we ignore that tree); ./actions/ survives because it's owned by a different checkout
  3. Checkout repository at target tagnow lays down ./src/ where nothing else will touch it
  4. Build docs / Publish docs — run against ./src/

No changes to the composite action itself (which is shared across other workflows).

🤖 Generated with Claude Code

The prepare_environment composite action does its own unqualified
actions/checkout@v6 with no path: argument, which wipes the workspace
root -- including any ./src/ we've laid down. This caused workflow_dispatch
runs on release tags to fail at the Build docs step with:

  Error: An error occurred trying to start process '/usr/bin/bash' with
  working directory '/home/runner/work/Aviary/Aviary/src'. No such file
  or directory

Reorder so prepare_docs_environment runs first (its internal checkout
lands in the workspace root and we ignore that tree) and the tag
checkout into ./src/ runs afterward. ./actions/ survives both because
actions/checkout only cleans the directory it owns.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

2 participants