Fix don't preview docs for contributors (#2994) [skip ci]
* checking against fork vs. main repo * force doc preview
This commit is contained in:
4
.github/workflows/preview-docs.yml
vendored
4
.github/workflows/preview-docs.yml
vendored
@@ -53,7 +53,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Netlify Publish
|
- name: Netlify Publish
|
||||||
uses: nwtgck/actions-netlify@v3.0
|
uses: nwtgck/actions-netlify@v3.0
|
||||||
if: ${{ secrets.NETLIFY_AUTH_TOKEN != '' }}
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
id: netlify
|
id: netlify
|
||||||
with:
|
with:
|
||||||
publish-dir: './_site'
|
publish-dir: './_site'
|
||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
|
||||||
- name: Update PR with preview link
|
- 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
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user