From df4f333c77670d77e338505a1eea4ceb503b209c Mon Sep 17 00:00:00 2001 From: Imran Siddique Date: Thu, 2 Jul 2026 11:18:38 -0700 Subject: [PATCH] fix(docs-ci): make docs_dir rewrite robust to CRLF line endings The Docs workflow rewrites `docs_dir: .` to `.docs_build` with sed, but the committed mkdocs.yml has CRLF line endings, so the anchored `\.$` no longer matched on the Linux runner. docs_dir stayed as the repo root and mkdocs aborted ("site_dir within docs_dir"), failing every docs deploy since. Strip CR before sed so the match works regardless of line endings. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7221d36..19756c6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,7 +63,8 @@ jobs: - name: Generate build config run: | - sed 's|^docs_dir: \.$|docs_dir: .docs_build|' mkdocs.yml > .mkdocs_build.yml + # Strip CR before sed so the docs_dir match is robust to CRLF line endings. + tr -d '\r' < mkdocs.yml | sed 's|^docs_dir: \.$|docs_dir: .docs_build|' > .mkdocs_build.yml - name: Build and deploy to GitHub Pages run: mkdocs gh-deploy --force --clean --config-file .mkdocs_build.yml