ci: fix breaking on foreign repos
This commit is contained in:
parent
e707aadbcc
commit
747d323584
1 changed files with 9 additions and 2 deletions
11
.github/workflows/storybook.yml
vendored
11
.github/workflows/storybook.yml
vendored
|
@ -16,12 +16,19 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.3.0
|
- uses: actions/checkout@v3.3.0
|
||||||
|
if: github.event_name != 'pull_request_target'
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Checkout HEAD
|
- uses: actions/checkout@v3.3.0
|
||||||
if: github.event_name == 'pull_request_target'
|
if: github.event_name == 'pull_request_target'
|
||||||
run: git checkout ${{ github.head_ref }}
|
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 $(git rev-list --parents -n1 HEAD | cut -d" " -f3)
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue