From 09dda462ab58dd7bafa01b31fb334cc78cde9507 Mon Sep 17 00:00:00 2001 From: salman Date: Thu, 31 Jul 2025 16:12:41 +0100 Subject: [PATCH] Fix don't preview docs for contributors (#2994) [skip ci] * checking against fork vs. main repo * force doc preview --- .github/workflows/preview-docs.yml | 4 ++-- index.qmd | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 2393c3d4c..db4abddce 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -53,7 +53,7 @@ jobs: - name: Netlify Publish uses: nwtgck/actions-netlify@v3.0 - if: ${{ secrets.NETLIFY_AUTH_TOKEN != '' }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} id: netlify with: publish-dir: './_site' @@ -68,7 +68,7 @@ jobs: NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - name: Update PR with preview link - if: ${{ steps.netlify.outcome == 'success' && secrets.NETLIFY_AUTH_TOKEN != '' }} + if: ${{ steps.netlify.outcome == 'success' }} uses: marocchino/sticky-pull-request-comment@v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/index.qmd b/index.qmd index 01572a8be..a178f4c7b 100644 --- a/index.qmd +++ b/index.qmd @@ -4,6 +4,8 @@ # toc-expand: 2 --- + +test test ```{python} #|output: asis #|echo: false