mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-31 16:33:10 +00:00
b836e0ae95
We just migrated to the jj-vcs GitHub org, so we should point to the new GitHub URLs.
23 lines
1.3 KiB
Bash
Executable file
23 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
# Set up a virtual environment with the required tools, build, and deploy the docs.
|
|
#
|
|
# Run from the root directory of the project as
|
|
# .github/scripts/docs-build-deploy 'https://jj-vcs.github.io' prerelease main
|
|
# All arguments after the first are passed to `mike deploy`, run
|
|
# `uv run -- mike deploy --help` for options. Note that `mike deploy`
|
|
# creates a commit directly on the `gh-pages` branch.
|
|
set -ev
|
|
|
|
export "SITE_URL_FOR_MKDOCS=$1"; shift
|
|
# Affects the generation of `sitemap.xml.gz` by `mkdocs`. See
|
|
# https://github.com/jimporter/mike/issues/103 and
|
|
# https://reproducible-builds.org/docs/source-date-epoch/
|
|
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct docs/ mkdocs.yml)
|
|
# TODO: `--alias-type symlink` is the
|
|
# default, and may be nicer in some ways. However,
|
|
# this requires deploying to GH Pages via a "custom GitHub Action", as in
|
|
# https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow.
|
|
# Otherwise, you get an error:
|
|
# > Site contained a symlink that should be dereferenced: /main.
|
|
# > For more information, see https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#config-file-error.
|
|
uv run -- mike deploy --alias-type copy "$@"
|