Import from GitHub Repository
ClassHost meets students and developers where they are. If you have already pushed a static website repository to GitHub—either via VS Code, command-line Git, or a code template—you can import it directly into ClassHost.
How the Import Flow Works
When you import an existing repository, ClassHost does not duplicate your files. Instead, it inspects your repository metadata, configures public hosting, and tracks the project in your classroom portfolio.
[User Selects Repository] ──> [Check Pages Status]
│
┌───────────────────────────┴───────────────────────────┐
▼ (Not Active) ▼ (Already Active)
[Enable GitHub Pages via API] [Import Metadata Directly]
│ │
[Poll Pages Build Status] ────────────────────────────────────┼──> [Success!]Import Walkthrough
1.
On the dashboard, click Deploy Project and choose the Import Existing Repository tab.
2.
ClassHost will load a list of your public repositories via the GitHub REST API.
3.
Select the repository you wish to host.
4.
Static Validation Check: ClassHost reviews your repository's default branch.
- It checks for an
index.htmlat the root level. - If no root
index.htmlis found, but the project contains package files (likepackage.json), ClassHost prompts you to specify a build output folder (e.g.,dist/,build/, ordocs/).
5.
Choose your ClassHost visibility level (Public, Unlisted, or Private).
6. Click Confirm Import.
Framework & Build Output Support
For students using front-end frameworks (Vite, React, SolidJS, or Svelte):
- ClassHost detects if your project needs a build directory.
- Make sure you have run the build command (e.g.,
npm run build) locally and pushed the output directory to GitHub, OR configured a GitHub Action that publishes the build folder to a branch (likegh-pages). - In the ClassHost import menu, set the target branch to the branch holding your static assets (commonly
gh-pagesormain) and the subfolder to your build folder (commonlydistor/).
If your repository contains backend files (like Express.js Node code, Django python files, or Laravel PHP scripts), ClassHost will import the repository metadata, but the site will not render dynamic server operations. GitHub Pages only serves client-side HTML, CSS, and JS.