From e6ddfbf892bdf91aa5d184cfdd7507738af2b33c Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Mon, 20 Nov 2023 16:19:04 -0500 Subject: [PATCH] Create doc publish workflow (#35) Add workflow for publishing docs --- .github/workflows/doc_publish.yaml | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/doc_publish.yaml diff --git a/.github/workflows/doc_publish.yaml b/.github/workflows/doc_publish.yaml new file mode 100644 index 00000000..7fdc7ab0 --- /dev/null +++ b/.github/workflows/doc_publish.yaml @@ -0,0 +1,44 @@ +name: Publish Docs +on: [workflow_dispatch] +permissions: + contents: write + +env: + POETRY_VERSION: "1.6.1" + +jobs: + docs: + strategy: + matrix: + python-version: + - "3.11" + runs-on: ubuntu-latest + name: Documentation Publish + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }} + uses: "./.github/actions/poetry_setup" + with: + python-version: ${{ matrix.python-version }} + poetry-version: ${{ env.POETRY_VERSION }} + working-directory: . + cache-key: benchmarks-all + + - name: Install dependencies + shell: bash + run: | + echo "Running tests, installing dependencies with poetry..." + poetry install --with test,lint,typing,docs + + - name: Sphinx build + shell: bash + run: | + make build_docs + - name: Publish Docs + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_build + force_orphan: true