Deployment
The theme is designed for GitHub Pages deployment. The init CLI creates the workflow file automatically.
What the CLI sets up
Section titled “What the CLI sets up”When you run npx @mcptoolshop/site-theme init, the scaffold includes:
.github/workflows/pages.yml— builds and deploys the site on push- The
basepath inastro.config.mjsset to your repo name - Static output mode (Astro default)
Deploy steps
Section titled “Deploy steps”- Push your repo to GitHub
- Go to your repo settings: Settings > Pages
- Under Build and deployment, set Source to GitHub Actions
- Push any change to
site/to trigger the first build
Your site will be live at https://<org>.github.io/<repo>/.
Workflow details
Section titled “Workflow details”The generated pages.yml workflow:
- Triggers on pushes that change files in
site/or the workflow itself - Runs on
ubuntu-latest - Installs dependencies, builds with Astro, and uploads the artifact
- Uses the official
actions/deploy-pagesaction - Includes concurrency control to cancel in-progress deploys
Custom domain
Section titled “Custom domain”To use a custom domain:
- Add a
CNAMEfile tosite/public/with your domain - Update the
sitefield inastro.config.mjsto your domain - Remove or adjust the
basepath if deploying to the root - Configure DNS as described in the GitHub Pages documentation
Troubleshooting
Section titled “Troubleshooting”Build fails with missing dependencies
Section titled “Build fails with missing dependencies”Make sure npm install runs inside the site/ directory. The workflow handles this automatically, but local builds need it too.
404 on subpages
Section titled “404 on subpages”Check that the base path in astro.config.mjs matches your repo name. For a repo at github.com/org/my-tool, the base should be /my-tool.
Styles not loading
Section titled “Styles not loading”Verify that global.css contains the three required lines:
@import "tailwindcss";@import "@mcptoolshop/site-theme/styles/theme.css";@source "../../node_modules/@mcptoolshop/site-theme";The @source directive is critical — without it, Tailwind will not generate the theme’s utility classes.