From 11cdb137f9a3dcba0555b02325494a25b2ca667e Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Wed, 6 Dec 2023 01:53:15 +0000 Subject: [PATCH] ci: deploy branch preview docs only on main repo Forked repositories normally do not have secrets correctly configured See https://github.com/orgs/community/discussions/26409#discussioncomment-3251822 --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d40599b736..aade1d462e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -350,11 +350,11 @@ jobs: path: docs/_build/.jupyter_cache branch-preview: + # We can only deploy for PRs on host repo + if: github.repository_owner == 'scikit-hep' runs-on: ubuntu-22.04 needs: [build-docs] name: Deploy Branch Preview - # We can only deploy for PRs on host repo - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} permissions: id-token: write contents: read