forked from mirrors/jj
5d57cf1977
This is an alternative to https://github.com/martinvonz/jj/pull/3732. I think it's pretty important to show the "latest" alias. I don't know a way to not show any alias for "prerelease" in the version selector without deleting all of them. I'll have to then separately delete the directories for the aliases on the gh-pages branch, so that the URL does not resolve to outdated pages. The downsides are: this will break https://martinvonz.github.io/jj/main/... and (only recently created) https://martinvonz.github.io/jj/nightly/... links. We won't have an always-on demo of how well aliases work for when and if we adjust how aliases (including the all-important latest alias) work in the future. However, expanding on #3732 (comment), mike is now randomly alternating between "nightly" and "main" being the first alias of prerelease (it never promised that the set of aliases would be ordered). So, the version selector keeps switching in which version it shows. Previously, this only affected the prerelease docs, but now it also affects https://martinvonz.github.io/jj/latest/.
34 lines
1,018 B
YAML
34 lines
1,018 B
YAML
name: website
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
prerelease-docs-build-deploy:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
|
- run: "git fetch origin gh-pages --depth=1"
|
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install poetry
|
|
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
|
|
with:
|
|
poetry-version: latest
|
|
- name: Install dependencies, compile and deploy docs
|
|
run: |
|
|
git config user.name 'jj-docs[bot]'
|
|
git config user.email 'jj-docs[bot]@users.noreply.github.io'
|
|
.github/scripts/docs-build-deploy 'https://martinvonz.github.io/jj' prerelease --push
|
|
- name: "Show `git diff --stat`"
|
|
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)"
|