mirror of
https://github.com/hanzoai/hanzo.network.git
synced 2026-09-25 02:14:24 +00:00
.github/workflows now holds sync.yml alone, carrying refs to git.hanzo.ai; every build runs natively there from .hanzo/workflows. .hanzo/workflows/deploy.yml publishes ghcr.io/hanzoai/hanzo-network:<sha> and does not deploy — the operator CR in hanzoai/universe names which tag is live. The GitHub Pages workflow it replaces is dead, not moved: Pages did not survive the hanzoai -> hanzo-apps transfer, so the repo's pages API is 404 and every run since 2026-03-04 ends "Failed to create deployment (status: 404) … Ensure GitHub Pages has been enabled". Relocating a guaranteed 404 to the forge buys nothing. public/CNAME goes with it: that file is a Pages control file, and neither hanzoai/static nor Cloudflare reads it. The live host is a Cloudflare Pages project built through CF's Git integration, outside every workflow file here — nothing in this commit changes what serves today. The Dockerfile ends FROM ghcr.io/hanzoai/static:v0.5.1 with dist at /public and runs it with -spa: 98 BrowserRouter routes plus the app's own path="*" NotFound need the fallback, or every deep link 404s. Measured against the image: -spa returns 200 for /account/billing, and without it a missing path 404s. Co-authored-by: Hanzo Dev <[email protected]>
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: deploy
|
|
|
|
# Builds hanzo.network and publishes the image the operator runs. This replaces
|
|
# the GitHub Pages workflow that used to live in .github/workflows: the site is
|
|
# served by hanzoai/static behind hanzoai/ingress, so there is no Pages and no
|
|
# Cloudflare Pages in the path.
|
|
#
|
|
# git.hanzo.ai runs this file natively. The image tag is the run's commit, and
|
|
# the operator CR in hanzoai/universe names which tag is live — a build never
|
|
# deploys itself.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: deploy-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
image:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: build and push
|
|
env:
|
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
if [ -z "${REGISTRY_TOKEN:-}" ]; then
|
|
echo "::error::REGISTRY_TOKEN is unset, so nothing was published. Add the org secret."
|
|
exit 1
|
|
fi
|
|
tag="$(git rev-parse --short HEAD)"
|
|
image="ghcr.io/hanzoai/hanzo-network:${tag}"
|
|
echo "${REGISTRY_TOKEN}" | docker login ghcr.io -u hanzo-dev --password-stdin
|
|
docker build -t "${image}" .
|
|
docker push "${image}"
|
|
echo "published ${image} — set spec.image.tag in universe crs/hanzo-network.yaml to ${tag}"
|