🪐

Gitea Pages

Self-Hosted Static Site Platform
Ready & Serving

Site URL Convention

Every deployed repository is automatically routed under its repository name:

https://pages.them4x.net/<repository-name>/
🚀 Native SPA Support
Deep routes automatically fall back to repo index.html.
⚡ Clean HTML URLs
/docs/about maps directly to /docs/about.html.
🔒 Automatic Traefik TLS
Managed Let's Encrypt certificates via Traefik.
📁 High Performance RAID
Zero storage bottlenecks on dedicated /raid2t pool.

Deployment via Gitea Actions

Add .gitea/workflows/pages.yml to your repository to publish on push to main or master:

name: Deploy Pages
on:
  push:
    branches: [main, master]
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      # Uncomment if your project needs a build step:
      # - name: Install & Build
      #   run: |
      #     npm ci || npm install
      #     npm run build

      - name: Deploy to Gitea Pages
        run: |
          REPO_NAME="${GITHUB_REPOSITORY#*/}"
          if [ -z "$REPO_NAME" ]; then echo "Error: REPO_NAME is empty" >&2; exit 1; fi
          TARGET="/pages/$REPO_NAME"
          STAGE="/pages/.staging_${REPO_NAME}_${GITHUB_RUN_ID:-$$}"
          rm -rf "$STAGE"
          mkdir -p "$STAGE"
          # For raw static repo:
          cp -a . "$STAGE"/
          rm -rf "$STAGE/.git" "$STAGE/.gitea" "$STAGE/.github"
          # OR for built project (e.g. Vite, React, Vue, Astro, Svelte):
          # cp -a dist/. "$STAGE"/
          chmod -R a+rwX "$STAGE"
          chown -R 1000:1000 "$STAGE" 2>/dev/null || true
          rm -rf "$TARGET"
          mv "$STAGE" "$TARGET"
          echo "Published: https://pages.them4x.net/$REPO_NAME/"