Skip to content

ci: mark workspace safe for git so mike can deploy docs in-container#91

Merged
nghorbani merged 1 commit into
mainfrom
hotfix/docs-deploy-safe-directory
Jun 3, 2026
Merged

ci: mark workspace safe for git so mike can deploy docs in-container#91
nghorbani merged 1 commit into
mainfrom
hotfix/docs-deploy-safe-directory

Conversation

@nghorbani
Copy link
Copy Markdown
Contributor

Problem

The docs deploy that ran after #88 merged to main failed at the Configure git for mike step with fatal: not in a git directory (run 26879965556). The deploy workflows run inside the cubertgmbh/cuvis_pyil container, where actions/checkout leaves the workspace owned by a different user than the container runs as, so git refuses to operate on it. As a result gh-pages is never created and the site never publishes.

Fix

Add git config --global --add safe.directory "$GITHUB_WORKSPACE" right after checkout in both deploy workflows (nightly + versioned), matching the sister repos. docs-check.yml runs only mkdocs build (no git/mike), so it doesn't need it.

After merge

The push to main re-runs the nightly deploy, which creates gh-pages and publishes the site. A maintainer then switches Settings → Pages → Deploy from branch: gh-pages.

The deploy-docs workflows run inside cubertgmbh/cuvis_pyil and check out the
repo as a different owner than the container user, so git refused the
workspace ("fatal: not in a git directory") at the "Configure git for mike"
step and the gh-pages deploy never ran. Add
`git config --global --add safe.directory "$GITHUB_WORKSPACE"` right after
checkout in both deploy workflows, matching the sister repos.
@nghorbani nghorbani requested a review from birkholz-cubert June 3, 2026 11:05
@nghorbani nghorbani merged commit c1c7c81 into main Jun 3, 2026
1 check passed
@nghorbani nghorbani deleted the hotfix/docs-deploy-safe-directory branch June 3, 2026 11:11
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