Skip to content

Fix docs workflow root path resolution in generate-docs.sh - #835

Merged
mickael-menu merged 2 commits into
developfrom
copilot/fix-build-and-deploy-job
Jun 26, 2026
Merged

mickael-menu merged 2 commits into
developfrom
copilot/fix-build-and-deploy-job

Conversation

Copilot AI commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

The build-and-deploy docs job failed because scripts/generate-docs.sh resolved the project root one directory too high in GitHub Actions, so Package.swift was not found. This PR corrects root resolution to match the repository checkout layout used by the workflow.

  • Root cause addressed

    • PROJECT_ROOT was derived from scripts/ using dirname(dirname(...)), which moved outside the repo root in CI.
  • Change

    • Update PROJECT_ROOT to the direct parent of scripts/ so the script always runs from the repository root before patching/building docs artifacts.
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
cd "$PROJECT_ROOT"

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-and-deploy Fix docs workflow root path resolution in generate-docs.sh Jun 26, 2026
Copilot AI requested a review from mickael-menu June 26, 2026 13:33
@mickael-menu
mickael-menu marked this pull request as ready for review June 26, 2026 14:10
Copilot AI review requested due to automatic review settings June 26, 2026 14:10

@mickael-menu mickael-menu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mickael-menu
mickael-menu merged commit 150b8f2 into develop Jun 26, 2026
7 checks passed
@mickael-menu
mickael-menu deleted the copilot/fix-build-and-deploy-job branch June 26, 2026 14:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the working-directory resolution in scripts/generate-docs.sh so the docs generation job runs from the repository root in GitHub Actions (ensuring Package.swift is found).

Changes:

  • Update PROJECT_ROOT to be the direct parent of scripts/ (instead of two levels up).
  • Ensure the script cds into the repository root before performing doc build steps.

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

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