Copilot commented on code in PR #4855:
URL: https://github.com/apache/arrow-adbc/pull/4855#discussion_r4181566750
##########
.github/workflows/nightly-website.yml:
##########
@@ -49,8 +49,13 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Build
+ if: github.event_name != 'push' || !startsWith(github.ref,
'refs/tags/apache-arrow-adbc-')
run: |
docker compose run docs
+ - name: Build
+ if: github.event_name == 'push' && startsWith(github.ref,
'refs/tags/apache-arrow-adbc')
+ run: |
+ docker compose run docs -e
ADBC_BASEURL="https://arrow.apache.org/adbc/current/"
Review Comment:
`docker compose run` requires run options before the service name. Here `-e`
is parsed as the command for `docs`, replacing the service command, so
tagged-release builds will fail instead of generating the site. Pass the
environment option before `docs` (as the other workflow invocations do).
##########
docs/source/conf.py:
##########
@@ -141,6 +141,11 @@ def setup(app):
# -- Options for HTML output -------------------------------------------------
#
https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
+if (baseurl := os.environ.get("ADBC_BASEURL")) is not None:
+ # This causes Sphinx to generate <link rel=canonical> tags for search
+ # engines. We only want this for tagged releases.
+ html_baseurl = baseurl
Review Comment:
This only adds canonical links to Sphinx-rendered pages. The published site
also replaces `cpp/api`, `java/api`, and `javascript/api` with Doxygen,
Javadoc, and TypeDoc output after Sphinx finishes
(`ci/scripts/docs_build.sh:68-74`), so those pages in both the versioned and
`current/` trees still lack the canonical links requested by #4854. Please
propagate the canonical base URL into those generators or post-process their
HTML before publishing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]