Spiceroad Platform is an Astro-based frontend for a Silkroad Online private-server storefront. The authored application lives in src/, and the deployable static output is generated into site/ only during local builds or the GitHub Pages workflow.
This repository intentionally keeps a root CNAME file as a conservative GitHub Pages custom-domain safeguard, while also generating site/CNAME from source during the build.
This project provides the marketing site, product catalog, gated resource pages, and dashboard shell for platform.spiceroad.online.
It is structured so that:
- all authored frontend code lives in
src/ - build output is generated into
site/ - GitHub Pages publishes from the workflow artifact, not from committed static files
- the custom domain is represented both by the root
CNAMEfile and bysrc/pages/CNAME.ts
- Astro
- TypeScript
- Lit for reusable web components
- GitHub Actions for build and deployment
- multi-page Astro site with shared layouts and components
- structured product, guide, and resource content in source
- legacy
.htmlcompatibility routes generated from source - GitHub Pages deployment to a generated
site/directory - GitHub Pages-compatible page-link normalization for static previewing
- Node.js 20 or newer
- npm
npm ciIf you intentionally change dependencies, run npm install and commit the updated lockfile.
Start the local development server:
npm run devCreate the production build:
npm run buildThis command:
- builds the Astro site
- writes generated output to
site/ - normalizes generated page links for static hosting while keeping built assets root-relative for client navigation
The site/ directory is generated output and is not intended to be committed.
Preview the built site locally:
npm run previewGitHub Pages deployment is handled by .github/workflows/deploy-pages.yml.
On pushes to main, the workflow:
- installs dependencies with
npm ci - runs
npm run build - uploads the generated
site/directory as the Pages artifact - deploys the artifact to GitHub Pages
.
|- .github/workflows/ # GitHub Pages deployment workflow
|- scripts/ # Build-time helper scripts
|- src/
| |- assets/ # Images and source-owned media
| |- components/ # Astro and Lit UI components
| |- content/ # Structured product and page content
| |- layouts/ # Shared page layouts
| |- lib/ # Routes, config, SEO, and helpers
| |- pages/ # Astro routes and generated compatibility endpoints
| |- scripts/ # Client-side browser scripts bundled by Astro
| |- styles/ # Global styles, tokens, and utilities
| '- env.d.ts # Astro type declarations
|- astro.config.mjs # Astro configuration
|- package.json # Scripts and dependencies
|- tsconfig.json # TypeScript configuration
'- README.md # Project documentation
- Create a feature branch for your changes.
- Keep authored changes inside
src/,scripts/, config files, or docs. - Do not commit generated
site/output. - Run
npm run buildbefore opening a pull request. - Update documentation when behavior, structure, or workflows change.
- There is no authored
public/directory in this project. - Static compatibility files such as
products.htmlare generated from source endpoints undersrc/pages/. - The root
CNAMEfile is intentionally kept in the repository as a persistent GitHub Pages custom-domain marker. src/pages/CNAME.tsalso generates the publishedsite/CNAMEfile so the deployment artifact contains the same domain value.- Generated deployment output still belongs in build artifacts, not in committed
site/content.