Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

ci: skip docs preview deploy steps for PRs from forks (#791)

André Ahlertf62e39c8e977
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index bf95610c..01aad693 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -51,7 +51,7 @@ jobs:
echo "burr.apache.org" > _build/CNAME # keep the cname file which this clobbers -- todo, unhardcode
- name: Comment on PR
uses: hasura/[email protected]
- if: github.ref != 'refs/heads/main'
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
@@ -60,7 +60,7 @@ jobs:
message: "Starting deployment of preview ⏳..."
- name: Build PR preview website
uses: peaceiris/actions-gh-pages@v3
- if: github.ref != 'refs/heads/main'
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
@@ -75,7 +75,7 @@ jobs:
keep_files: true # Add this line to keep existing files in the gh-pages branch
- name: Update comment
uses: hasura/[email protected]
- if: github.ref != 'refs/heads/main'
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}