]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
👷 Update CI to build MkDocs Insiders only when the secrets are available, for Dependa...
authorSebastián Ramírez <tiangolo@gmail.com>
Sun, 29 Oct 2023 08:51:26 +0000 (12:51 +0400)
committerGitHub <noreply@github.com>
Sun, 29 Oct 2023 08:51:26 +0000 (12:51 +0400)
.github/workflows/build-docs.yml

index 879cc7c5d8504245dd89a1121f4028b41e9237bd..3d29204f7888edc40fd69c4c28550f55a7b4e05f 100644 (file)
@@ -63,17 +63,17 @@ jobs:
         if: steps.cache.outputs.cache-hit != 'true'
         run: python -m poetry install
       - name: Install Material for MkDocs Insiders
-        if: ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false ) && steps.cache.outputs.cache-hit != 'true'
+        if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
         run: python -m poetry run pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
       - uses: actions/cache@v3
         with:
           key: mkdocs-cards-${{ github.ref }}
           path: .cache
       - name: Build Docs
-        if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
+        if: github.event_name == 'pull_request' && github.secret_source != 'Actions'
         run: python -m poetry run mkdocs build
       - name: Build Docs with Insiders
-        if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
+        if: github.event_name != 'pull_request' || github.secret_source == 'Actions'
         run: python -m poetry run mkdocs build --config-file mkdocs.insiders.yml
       - uses: actions/upload-artifact@v3
         with: