From 5dcc1f91fd14470f9fa74a1b34c5257e58c66d9b Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Sun, 24 Sep 2023 14:47:33 -0500 Subject: [PATCH] fix(ci): add missing ci step --- .github/workflows/ci.yaml | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4eb66de..5c8310c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,3 +28,43 @@ jobs: - name: Execute Pre-Commit run: pre-commit run --show-diff-on-failure --color=always --all-files + + build-docs: + needs: + - validate + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - uses: pdm-project/setup-pdm@v3 + name: Set up PDM + with: + python-version: "3.11" + allow-python-prereleases: true + cache: true + + - name: Install dependencies + run: pdm install -G:docs + + - name: Build docs + run: pdm run make docs + + - name: Save PR number + env: + PR_NUMBER: ${{ github.event.number }} + run: echo $PR_NUMBER > .pr_number + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: docs-preview + path: | + docs/_build/html + .pr_number