Skip to content

Commit 2619283

Browse files
Fix CI when PR is from a fork (#149)
1 parent 1584610 commit 2619283

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/cleanup-pr-preview.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
jobs:
66
cleanup:
77
runs-on: ubuntu-latest
8+
# PRs from forks don't create previews
9+
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
810
permissions:
911
contents: write
1012
steps:

.github/workflows/update.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ jobs:
6666
git-config-name: github-actions[bot]
6767
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
6868
- name: Deploy metadata view to subdirectory if pull request 🚀
69-
if: github.event_name == 'pull_request'
69+
# This does not work for PRs from forks
70+
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
7071
uses: JamesIves/github-pages-deploy-action@v4
7172
with:
7273
folder: build
@@ -75,6 +76,7 @@ jobs:
7576
git-config-name: github-actions[bot]
7677
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
7778
- uses: actions/upload-artifact@v5
79+
if: always()
7880
with:
7981
name: build
8082
path: build

0 commit comments

Comments
 (0)