Skip to content

Add static course website and GitHub Pages deployment workflow#13

Open
jamesmontemagno wants to merge 8 commits intogithub:mainfrom
jamesmontemagno:main
Open

Add static course website and GitHub Pages deployment workflow#13
jamesmontemagno wants to merge 8 commits intogithub:mainfrom
jamesmontemagno:main

Conversation

@jamesmontemagno
Copy link

This pull request introduces a new GitHub Actions workflow for deploying documentation to GitHub Pages and updates the README.md to include a link to the course website. These changes improve the project's documentation accessibility and deployment automation.

Running sample: https://jamesmontemagno.github.io/copilot-cli-for-beginners/

Copilot AI review requested due to automatic review settings March 9, 2026 22:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a static documentation/course website under docs/ and automates publishing it to GitHub Pages, with a README badge linking to the hosted site.

Changes:

  • Adds static site pages (docs/index.html, docs/step.html) plus .nojekyll for GitHub Pages.
  • Introduces a GitHub Actions workflow to deploy docs/ to GitHub Pages on pushes to main.
  • Updates README.md to include a “View Course Website” badge/link.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/index.html Adds the static course landing page.
docs/step.html Adds the chapter reader UI that fetches and renders chapter README content.
docs/.nojekyll Disables Jekyll processing for the Pages artifact.
README.md Adds a website badge/link for the course site.
.github/workflows/deploy-pages.yml Adds Pages deployment workflow for the docs/ folder.
Comments suppressed due to low confidence (1)

docs/step.html:819

  • The footer navigation buttons also omit an explicit type. For non-submit buttons, set type="button" to avoid accidental form submission behavior if the layout changes later.
                    <button class="nav-footer-btn disabled" id="prevFooter">← Previous</button>
                    <span class="nav-footer-center" id="chapterIndicator"></span>
                    <button class="nav-footer-btn" id="nextFooter">Next →</button>
                </nav>

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +1090 to +1099
function renderMarkdown(raw, chapterId) {
const processed = fixImagePaths(raw, chapterId);

marked.setOptions({
gfm: true,
breaks: false,
});

return marked.parse(processed);
}
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

marked.parse() is used to render remote Markdown into innerHTML without any sanitization. Since Marked does not sanitize HTML, any raw HTML (including potentially <script> tags) in the fetched README content would execute on the GitHub Pages origin. Consider sanitizing the generated HTML (e.g., via DOMPurify) or configuring Marked to escape/strip raw HTML before assigning to innerHTML.

Copilot uses AI. Check for mistakes.
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script>
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The Marked dependency is loaded from a public CDN without Subresource Integrity (SRI). This creates a supply-chain risk for the GitHub Pages site. Prefer pinning with an integrity attribute (and crossorigin) or vendoring the script into the repo so the workflow deploys a known-good artifact.

Suggested change
<script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"
integrity="REPLACE_WITH_ACTUAL_SHA384_HASH_FOR_marked.min.js"
crossorigin="anonymous"></script>

Copilot uses AI. Check for mistakes.
[![Official Copilot CLI documentation](https://img.shields.io/badge/GitHub-CLI_Documentation-00a3ee?style=flat-square&logo=github)](https://docs.github.com/en/copilot/how-tos/copilot-cli)&ensp;
[![Join AI Foundry Discord](https://img.shields.io/badge/Discord-AI_Community-blue?style=flat-square&logo=discord&color=5865f2&logoColor=fff)](https://aka.ms/foundry/discord)
[![Join AI Foundry Discord](https://img.shields.io/badge/Discord-AI_Community-blue?style=flat-square&logo=discord&color=5865f2&logoColor=fff)](https://aka.ms/foundry/discord)&ensp;
[![View Course Website](https://img.shields.io/badge/Website-Course_Guide-6e40c9?style=flat-square&logo=github)](https://jamesmontemagno.github.io/copilot-cli-for-beginners/)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The new badge links to https://jamesmontemagno.github.io/copilot-cli-for-beginners/, but this repository’s canonical owner/org appears to be github (e.g., Codespaces and repo links use github/copilot-cli-for-beginners). If GitHub Pages is deployed from this repo, the default URL will be https://github.github.io/copilot-cli-for-beginners/. Please update the README link (or document why a different Pages host is correct) to avoid sending users to the wrong site.

Copilot uses AI. Check for mistakes.
Comment on lines +791 to +793
<button class="nav-btn" id="prevBtn" disabled>← Prev</button>
<button class="nav-btn" id="nextBtn">Next →</button>
</nav>
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

These navigation controls are <button> elements without an explicit type. In HTML the default is type="submit", which can cause unintended form submissions if this markup is ever placed inside a <form>. Set type="button" for non-submit buttons.

This issue also appears on line 816 of the same file.

Copilot uses AI. Check for mistakes.
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