From f74235bb567e5668cf91d7a2a44747455b63aaea Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 17 Jul 2024 14:14:04 -0400 Subject: [PATCH] Validate docs in CI (#5158) ## Summary Closes https://github.com/astral-sh/uv/issues/5155. --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed01281adbc3..80ef1b56e227 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -347,6 +347,33 @@ jobs: - uses: actions/checkout@v4 - uses: crate-ci/typos@master + docs: + name: "mkdocs" + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: "Add SSH key" + if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }} + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }} + - name: "Install Insiders dependencies" + if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }} + run: pip install -r docs/requirements-insiders.txt + - name: "Install dependencies" + if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }} + run: pip install -r docs/requirements.txt + - name: "Build Insiders docs" + if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }} + run: mkdocs build --strict -f mkdocs.insiders.yml + - name: "Build docs" + if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }} + run: mkdocs build --strict -f mkdocs.public.yml + build-binary-linux: needs: determine_changes if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}