ci(pages): serve the go.daytona.com vanity import path from main

Merged
MD
12d ago
+187-2

go get go.daytona.com/... cannot work today. Pages already serves go.daytona.com, but the site is built with DOMAIN: github.com/daytona/clients, so its go-import tag has the wrong prefix and the Go proxy rejects it:

unrecognized import path "go.daytona.com/sdk-go": ... meta tag github.com/daytona/clients did not match import path go.daytona.com/sdk-go

The 2.x Go SDK will be go.daytona.com/sdk/v2 (code in sdk-go/, tags sdk-go/v2.x.y), released from main. This PR moves the site to main:

  • scripts/go-vanity-site.sh generates <meta name="go-import" content="go.daytona.com/sdk git https://github.com/daytona/clients sdk-go">. The fourth field (Go 1.25+, go help importpath) maps the path to the sdk-go/ directory, so the import path does not repeat the directory name. I checked this end to end with Go 1.26.10 against a local server and a repo holding both sdk-go/v0.x and sdk-go/v2.x tags: go get, go get <pkg>@v2.1.0, go mod tidy and go get -u all resolve /v2. go-source links point at main/sdk-go, and the CNAME file is always written.
  • scripts/go-vanity-site_test.sh checks the prefix, the 404.html catch-all (Pages answers module paths with it), the go-source branch and CNAME.
  • .github/workflows/go-vanity-pages.yaml runs the tests on PRs and deploys on pushes to main. After deploying, it waits until https://go.daytona.com/sdk/v2?go-get=1 serves the expected tag.
  • docs/RELEASING.md had the wrong branch for the Pages deploy and now describes the new setup.

The 0.x Go modules keep github.com/daytona/clients/... and never read this site, so they are unaffected.

Merge together with #687, which removes the 0.x copy of the workflow from release/v0. Otherwise the next push to release/v0 redeploys the site with the wrong prefix. The github-pages environment already allows main.