Skip to content

Commit

Permalink
GitHub release action: publish HTML docs in an archive
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyagr committed Aug 30, 2023
1 parent ffb2ad0 commit 02e3978
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,44 @@ jobs:
asset_name: ${{ env.ASSET }}
asset_content_type: application/octet-stream

docs-release:
runs-on: ubuntu-latest
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:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
permissions:
contents: write

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extra:
version:
provider: mike
plugins:
- offline
- search
- redirects:
redirect_maps:
Expand Down

0 comments on commit 02e3978

Please sign in to comment.