From 7f7d89471dbc45c1880090b653605b076bc19398 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Tue, 29 Aug 2023 21:55:21 -0700 Subject: [PATCH] GitHub release action: publish HTML docs in an archive --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 40 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a70abef682..3c8e61dc52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,6 +71,45 @@ jobs: asset_name: ${{ env.ASSET }} asset_content_type: application/octet-stream + docs-package: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + permissions: + contents: write + + steps: + - name: Install packages (Ubuntu) + if: matrix.os == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + - name: Install poetry + uses: abatilo/actions-poetry@v2 + with: + poetry-version: latest + - name: Compile docs and zip them up + run: | + poetry install + poetry run -- mkdocs build --no-directory-urls + archive="jj-${{ github.event.release.tag_name }}-docs-html.tar.gz" + tar czf "$archive" -C "rendered-docs" . + echo "ASSET=$archive" >> $GITHUB_ENV + - name: Upload release archive + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ env.ASSET }} + asset_name: ${{ env.ASSET }} + asset_content_type: application/octet-stream + docs-build-deploy: strategy: matrix: diff --git a/mkdocs.yml b/mkdocs.yml index 1a0abcc31f..aa80f46aaa 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,6 +12,7 @@ extra: version: provider: mike plugins: + - offline - search - redirects: redirect_maps: