feat(site): publish site/ as GitHub Pages start page#14
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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">andog:urlupdated 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 deployingsite/to GitHub Pages using the officialactions/configure-pages@v5,actions/upload-pages-artifact@v3, andactions/deploy-pages@v4actions. Runs only on pushes tomainthat touchsite/**or the workflow itself, so it doesn't fight the existing CI workflow (ci.yml). Usescontents: read,pages: write,id-token: writepermissions and apagesconcurrency group withcancel-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.ymlis present and references the official Pages actions.Coexistence with existing CI
The new workflow is in a separate file (
pages.yml) with a distinctconcurrencygroup (pages) and path filter (site/**). It does not modifyci.yml. Pushes that don't touchsite/won't trigger a Pages deploy; pushes that don't touch backend/frontend/scripts won't slow CI down.Testing
./scripts/check_site.shpasses locally (all 9 checks ✓)python3 -c "import yaml; yaml.safe_load(open('.github/workflows/pages.yml'))"— workflow YAML parsesnode --checksite/index.htmlresolve on disk🤖 Generated by Computer