website: build at canonical root baseURL, not the Pages subpath
The Hugo/Docsy site (#4858) rendered unstyled live. go-micro.dev is an nginx proxy that maps `/` to micro.github.io/go-micro/, but the deploy workflow built with `--baseURL "${{ steps.pages.outputs.base_url }}/"`, which for this project repo is https://micro.github.io/go-micro/. That prefixes every asset and link with /go-micro/, so through the proxy the stylesheet resolves to go-micro.dev/go-micro/scss/... which maps to micro.github.io/go-micro/go-micro/scss/... and 404s — no CSS. Verified: the CSS is 200 at micro.github.io/go-micro/scss/...; the baked /go-micro/ path 404s through the proxy; the root path (this fix) is 200. Build at the canonical root baseURL (https://go-micro.dev/, already in hugo.yaml) so assets are /scss/... — which the proxy maps correctly. This matches how the old Jekyll site was configured (baseurl: ""). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
This commit is contained in:
@@ -54,7 +54,14 @@ jobs:
|
||||
- name: Install frontend dependencies
|
||||
run: npm ci
|
||||
- name: Build site
|
||||
run: hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
# go-micro.dev is served by an nginx proxy that maps `/` to
|
||||
# micro.github.io/go-micro/ (see the deploy nginx.conf). The site must
|
||||
# therefore be built at its canonical ROOT baseURL — not the Pages
|
||||
# project subpath from configure-pages (https://micro.github.io/go-micro/).
|
||||
# Building at the subpath prefixes every asset/link with /go-micro/, which
|
||||
# becomes /go-micro/go-micro/ through the proxy and 404s, leaving the site
|
||||
# unstyled. hugo.yaml already declares baseURL: https://go-micro.dev/.
|
||||
run: hugo --gc --minify --baseURL "https://go-micro.dev/"
|
||||
- name: Upload Pages artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user