Skip to content

Fix deploy-gh-pages workflow: extract inline Python to separate script#2

Merged
stev4501 merged 2 commits into
mainfrom
copilot/fix-workflow-failure
Mar 21, 2026
Merged

Fix deploy-gh-pages workflow: extract inline Python to separate script#2
stev4501 merged 2 commits into
mainfrom
copilot/fix-workflow-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

The deploy-gh-pages.yml workflow fails instantly (0s, 0 jobs) because the inline Python heredoc contains unindented HTML lines that break YAML block scalar parsing.

  • Extract build script to scripts/build-gh-pages.py — identical logic, no YAML escaping issues
  • Simplify workflow step from 50-line run: | heredoc to run: python3 scripts/build-gh-pages.py
  • Add gh-pages-dist/ to .gitignore

The root cause: lines like <html lang="en"> at column 1 inside a run: | block are interpreted as YAML keys, not string content.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

The workflow YAML was invalid because the Python heredoc contained a
multi-line HTML string with lines starting at column 1, breaking out
of the YAML literal block scalar (run: |). This caused GitHub Actions
to fail with 0 jobs in 0s.

Fix: Move the build logic into scripts/build-gh-pages.py and call it
from the workflow step.

Co-authored-by: stev4501 <34610768+stev4501@users.noreply.github.com>
Agent-Logs-Url: https://github.com/stev4501/Hormone-experts/sessions/c533b682-3119-418b-8e42-09559a5a8a65
Copilot AI changed the title [WIP] Fix workflow failure in option A Fix deploy-gh-pages workflow YAML parse failure Mar 21, 2026
Copilot AI requested a review from stev4501 March 21, 2026 03:07
Copilot AI changed the title Fix deploy-gh-pages workflow YAML parse failure Fix deploy-gh-pages workflow: extract inline Python to separate script Mar 21, 2026
Copy link
Copy Markdown
Owner

@stev4501 stev4501 left a comment

Choose a reason for hiding this comment

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

New

@stev4501 stev4501 marked this pull request as ready for review March 21, 2026 03:13
@stev4501 stev4501 merged commit 52ec163 into main Mar 21, 2026
1 check passed
@stev4501
Copy link
Copy Markdown
Owner

New

1 similar comment
@stev4501
Copy link
Copy Markdown
Owner

New

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