Skip to content

Commit

Permalink
ci: fix breaking on foreign repos
Browse files Browse the repository at this point in the history
  • Loading branch information
acid-chicken authored May 17, 2023
1 parent e707aad commit 747d323
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ jobs:

steps:
- uses: actions/[email protected]
if: github.event_name != 'pull_request_target'
with:
fetch-depth: 0
submodules: true
- name: Checkout HEAD
- uses: actions/[email protected]
if: github.event_name == 'pull_request_target'
with:
fetch-depth: 0
submodules: true
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Checkout actual HEAD
if: github.event_name == 'pull_request_target'
run: git checkout ${{ github.head_ref }}
run: git checkout $(git rev-list --parents -n1 HEAD | cut -d" " -f3)
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
Expand Down

0 comments on commit 747d323

Please sign in to comment.