Skip to content

🚀 Flügel Economics - Production Deployment & Hosting Guide

Flügel Economics is built with VitePress, compiling into a lightning-fast, zero-runtime static documentation site. It can be hosted on Cloudflare Pages (Free Tier) with global edge distribution and automated CI/CD.


Step 1: Connect Git Repository

  1. Log in to the Cloudflare Dashboard.
  2. Navigate to Workers & PagesCreate applicationPagesConnect to Git.
  3. Select the Flugel-Economics repository.
  4. Set the build configuration:
    • Project Name: flugel-economics
    • Production Branch: main
    • Framework Preset: VitePress (or None)
    • Build Command: npm run docs:build
    • Build Output Directory: .vitepress/dist

Step 2: Environment Variables

Add the following under SettingsEnvironment Variables:

  • NODE_VERSION: 20

Step 3: Custom Domain

  1. In Cloudflare Pages, go to Custom DomainsSet up a domain.
  2. Enter economics.flugelsoft.com (or your preferred domain/subdomain).
  3. Cloudflare will automatically provision and renew the SSL/TLS certificate.

🤖 Method 2: Automated Deployment via GitHub Actions

Create .github/workflows/deploy.yml:

yaml
name: Deploy Flügel Economics to Cloudflare Pages

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      deployments: write
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'

      - name: Install Dependencies
        run: npm ci

      - name: Build Static Site
        run: npm run docs:build

      - name: Publish to Cloudflare Pages
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          command: pages deploy .vitepress/dist --project-name=flugel-economics

💻 Method 3: Direct CLI Deployment via Wrangler

bash
# Build the project
npm run docs:build

# Deploy with Wrangler
npx wrangler pages deploy .vitepress/dist --project-name=flugel-economics