mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-24 20:09:02 +00:00
The docs publish to Sites project docs-hanzo-ai, since docs is a reserved label no project can take
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
name: deploy
|
||||
|
||||
# docs.hanzo.ai is a static export on the Sites plane. This job builds
|
||||
# apps/docs/out and publishes it as project `docs`, whose prefix (hanzo/docs) the
|
||||
# docs.hanzo.ai route serves. No image, no pod. RELEASE.md has the whole path.
|
||||
# apps/docs/out and publishes it as project `docs-hanzo-ai`, whose prefix
|
||||
# (hanzo/docs-hanzo-ai) the docs.hanzo.ai route serves. No image, no pod.
|
||||
# RELEASE.md has the whole path.
|
||||
#
|
||||
# It runs on git.hanzo.ai (hanzoai/docs, a pull mirror of this repo), which reads
|
||||
# .hanzo/workflows/. GitHub reads only .github/workflows/, so it runs none of it.
|
||||
@@ -161,10 +162,14 @@ jobs:
|
||||
grep -rqF "$NEXT_PUBLIC_PUBLISHABLE_KEY" apps/docs/out \
|
||||
|| { echo "::error::the ingest key is not in the export"; exit 1; }
|
||||
|
||||
# The slug is the host's name, as hanzo-ai is hanzo.ai's and cloud-hanzo-ai
|
||||
# is cloud.hanzo.ai's. `docs` cannot be a project: it is a reserved label
|
||||
# (cloud apps/sites/reserved.go), so creating it answers 400, and the first
|
||||
# run to reach this step failed there with the export built and gated.
|
||||
- name: publish
|
||||
uses: hanzoai/ci/.github/actions/site@v1
|
||||
with:
|
||||
slug: docs
|
||||
slug: docs-hanzo-ai
|
||||
dir: apps/docs/out
|
||||
jobs: '48'
|
||||
env:
|
||||
|
||||
+9
-4
@@ -8,13 +8,18 @@ There is no image to tag and no pin to move.
|
||||
-> git.hanzo.ai/hanzoai/docs a pull mirror of github.com/hanzo-docs/docs
|
||||
-> .hanzo/workflows/deploy.yml the forge reads this directory natively
|
||||
-> pnpm build --filter=docs NEXT_EXPORT=1 -> apps/docs/out
|
||||
-> hanzoai/ci .github/actions/site POST /v1/projects/docs/deployments
|
||||
-> s3://hanzo-sites/hanzo/docs the prefix the docs.hanzo.ai route serves
|
||||
-> hanzoai/ci .github/actions/site POST /v1/projects/docs-hanzo-ai/deployments
|
||||
-> s3://hanzo-sites/hanzo/docs-hanzo-ai the prefix the docs.hanzo.ai route serves
|
||||
|
||||
The route is an `IngressRoute` + `Middleware` pair in hanzoai/universe
|
||||
(`charts/app/values/hanzo/static-sites.yaml`): `Host(docs.hanzo.ai)` ->
|
||||
`docs-static` -> `root: s3://hanzo-sites/hanzo/docs`. No pod, no replicas, no
|
||||
image. A site is files and a route.
|
||||
`docs-static` -> `root: s3://hanzo-sites/hanzo/docs-hanzo-ai`. No pod, no
|
||||
replicas, no image. A site is files and a route.
|
||||
|
||||
The project is named for its host, as `hanzo-ai` is hanzo.ai's. `docs` is a
|
||||
reserved label on the Sites plane (cloud `apps/sites/reserved.go`), so no project
|
||||
can be created with it: the publish step asks for the project first, and that ask
|
||||
answered 400 "slug is a reserved subdomain" the first time a run got that far.
|
||||
|
||||
Every workflow lives in `.hanzo/workflows/` and runs on git.hanzo.ai, which reads
|
||||
that directory first. GitHub reads only `.github/workflows/`, so none of them can
|
||||
|
||||
Reference in New Issue
Block a user