Skip to content

devruji/xhverse-site

Repository files navigation

XHVerse Site

CI Built with Astro Bun License: MIT

Welcome to the XHVerse Site repository! This is a modern static web application built with Astro.

🛠 Tech Stack

Features

  • Rapid frontend development and high performance.
  • Automated testing with Unit and E2E tools.
  • Continuous Integration (CI) via GitHub Actions.
  • Automated production and preview deployments via Cloudflare Pages Git integration.
  • Built and managed with Bun for maximum speed.

Getting Started

Prerequisites

  • Bun (v1.0 or higher)

Installation

Clone the repository and install dependencies:

git clone https://github.com/devruji/xhverse-site.git
cd xhverse-site
bun install

Local Development

Start the development server:

bun run dev

The site will be available at http://localhost:4321.

Testing

Run unit tests with coverage:

bun run coverage

Run type/content checks:

bun run typecheck

Run end-to-end tests:

bun run test:e2e

Building for Production

Build the production site locally:

bun run build

The built output will be inside the ./dist/ directory.

Deployment

This project uses GitHub Actions for CI only. Deployments should be handled by Cloudflare Pages Git integration so Cloudflare can build the site with the correct production or preview environment variables.

Current branch flow:

  • feat/* -> preview deployment on Cloudflare Pages
  • development -> preview deployment on Cloudflare Pages
  • main -> production deployment to https://xhverse.co

Recommended Cloudflare Pages settings:

  • Production branch: main
  • Build command: bun run build
  • Build output directory: dist

Recommended environment variables:

  • Production:
    • PUBLIC_PRODUCTION_BRANCH=main
    • PUBLIC_SITE_URL=https://xhverse.co
  • Preview:
    • PUBLIC_PRODUCTION_BRANCH=main

This setup matches the SEO behavior in the app:

  • Production builds emit canonical URLs for https://xhverse.co
  • Preview builds fall back to their preview URL and add noindex, nofollow

Important Cloudflare limitation:

  • If the current Pages project was created as a Direct Upload project, Cloudflare does not let you convert it to Git integration later. In that case, create a new Pages project connected to the GitHub repository and migrate the custom domain to that project.

© License & Copyright

This project's code is licensed under the MIT License.

Note: Unless otherwise stated, all written content, images, and personal media published on the site are all rights reserved to the author.