Skip to content

Commit 94f3765

Browse files
authored
👷 Update CI to build MkDocs Insiders only when the secrets are available, for Dependabot (#683)
1 parent 31ed654 commit 94f3765

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎.github/workflows/build-docs.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ jobs:
6363
if: steps.cache.outputs.cache-hit != 'true'
6464
run: python -m poetry install
6565
- name: Install Material for MkDocs Insiders
66-
if: ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false ) && steps.cache.outputs.cache-hit != 'true'
66+
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true'
6767
run: python -m poetry run pip install git+https://${{ secrets.SQLMODEL_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git
6868
- uses: actions/cache@v3
6969
with:
7070
key: mkdocs-cards-${{ github.ref }}
7171
path: .cache
7272
- name: Build Docs
73-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
73+
if: github.event_name == 'pull_request' && github.secret_source != 'Actions'
7474
run: python -m poetry run mkdocs build
7575
- name: Build Docs with Insiders
76-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
76+
if: github.event_name != 'pull_request' || github.secret_source == 'Actions'
7777
run: python -m poetry run mkdocs build --config-file mkdocs.insiders.yml
7878
- uses: actions/upload-artifact@v3
7979
with:

0 commit comments

Comments
 (0)