Skip to content

feat(site): publish site/ as GitHub Pages start page#14

Merged
StewAlexander-com merged 1 commit into
mainfrom
add-github-pages-site
May 22, 2026
Merged

feat(site): publish site/ as GitHub Pages start page#14
StewAlexander-com merged 1 commit into
mainfrom
add-github-pages-site

Conversation

@StewAlexander-com
Copy link
Copy Markdown
Owner

Summary

Turns site/ into the project's start page and publishes it to GitHub Pages so newcomers land on a polished page that walks them through cloning, installing, and running Python Tutor — without having to read the README first.

Once Pages is enabled on the repo (Settings → Pages → Source: GitHub Actions), the site will be live at:

https://stewalexander-com.github.io/python-tutor/

What changed

  • site/index.html — Start section reworked from a single two-command block into three numbered steps (Clone / Install / Run) with their own copy-to-clipboard buttons. Clone uses the HTTPS URL so it works without the GitHub CLI. Added a "common variations" <details> block and a row of prominent links to Repo / README / Issues. <link rel="canonical"> and og:url updated to the Pages URL. Existing dark/amber design and the visual-overflow fix from fix(site): stop Ask tutor popup from obscuring code lab #13 are preserved.
  • site/style.css — Adds step-card styling, copy-button styling, the <details> disclosure styling, and a links row. No existing rules were removed.
  • .github/workflows/pages.yml — New workflow deploying site/ to GitHub Pages using the official actions/configure-pages@v5, actions/upload-pages-artifact@v3, and actions/deploy-pages@v4 actions. Runs only on pushes to main that touch site/** or the workflow itself, so it doesn't fight the existing CI workflow (ci.yml). Uses contents: read, pages: write, id-token: write permissions and a pages concurrency group with cancel-in-progress: false (the recommended Pages pattern).
  • README.md — Adds a top-of-file pointer to the Pages start page and rewrites the "Hero website / start page" section to explain the new URL and deployment.
  • site/README.md — Notes the published URL and which workflow deploys it.
  • scripts/check_site.sh — Now validates that the clone / install / run commands are present in the HTML, that repo/README/issues links exist, that the copy buttons are wired up, and that .github/workflows/pages.yml is present and references the official Pages actions.

Coexistence with existing CI

The new workflow is in a separate file (pages.yml) with a distinct concurrency group (pages) and path filter (site/**). It does not modify ci.yml. Pushes that don't touch site/ won't trigger a Pages deploy; pushes that don't touch backend/frontend/scripts won't slow CI down.

Testing

  • ./scripts/check_site.sh passes locally (all 9 checks ✓)
  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/pages.yml'))" — workflow YAML parses
  • Inline copy-button JS passes node --check
  • All local asset references in site/index.html resolve on disk
  • After merge: enable GitHub Pages → "Source: GitHub Actions" in repo settings, confirm the Pages deploy succeeds and the URL serves the new start page

🤖 Generated by Computer

Reworks site/ into a proper start page for the repo & software and adds a
GitHub Actions workflow that deploys it to GitHub Pages on every push to
main that touches site/.

- index.html: replace the two-command Start section with three numbered
  steps (Clone / Install / Run), each with its own copy-to-clipboard
  button. The clone block uses the HTTPS URL so visitors don't need the
  GitHub CLI installed. Added prominent links to the repo, README, and
  issues. Canonical and og:url now point at the Pages URL.
- style.css: numbered step cards, copy button styling, a <details>
  disclosure for common variations, and a links row beneath the steps.
- .github/workflows/pages.yml: new workflow using actions/configure-pages,
  actions/upload-pages-artifact, and actions/deploy-pages. Path-filtered
  to site/ and the workflow itself so it doesn't fight the existing CI
  workflow. Uses pages/id-token permissions and a non-cancelling pages
  concurrency group.
- README.md: top-of-file pointer to the Pages start page and an updated
  "Hero website / start page" section explaining how deployment works.
- site/README.md: notes the published URL and which workflow deploys it.
- scripts/check_site.sh: validates the new install content (clone /
  install / run commands, repo/README/issues links, copy buttons) and
  that the Pages workflow exists and references the official actions.
@StewAlexander-com StewAlexander-com marked this pull request as ready for review May 22, 2026 11:59
@StewAlexander-com StewAlexander-com merged commit a85b067 into main May 22, 2026
5 checks passed
@StewAlexander-com StewAlexander-com deleted the add-github-pages-site branch May 22, 2026 11:59
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.

1 participant