From 42080fd71aea5f5371416d6982bd3f7ed8f29c4a Mon Sep 17 00:00:00 2001 From: Stephen Arnold Date: Sat, 26 Oct 2024 20:57:30 -0700 Subject: [PATCH] new: usr: add docs build and deployment to release workflow Signed-off-by: Stephen Arnold --- .github/workflows/release.yml | 40 ++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2b7a09..076949b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: create_release: name: Create Release needs: [wheels] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Get version @@ -93,3 +93,41 @@ jobs: prerelease: false files: | packages/redis* + + docs: + name: Release docs + needs: [create_release] + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Add python requirements + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Build docs + run: | + tox -e docs-lint,docs + + - uses: actions/upload-artifact@v4 + with: + name: ApiDocsHTML + path: "docs/_build/html/" + + - name: set nojekyll for github + run: | + sudo touch docs/_build/html/.nojekyll + + - name: Deploy docs to gh-pages + if: ${{ github.event_name == 'push' }} + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs/_build/html/