Skip to content

Commit

Permalink
Fix: SHAの取得元を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Nov 9, 2024
1 parent a2a8713 commit 298b7dd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build_preview_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ jobs:
- name: Build
run: |
npm run storybook:build -- --output-dir $(pwd)/dist_preview/storybook
VITE_EXTRA_VERSION_INFO=$(git rev-parse --short HEAD) \
if [ -n "${{ github.event.pull_request.head.sha }}" ]; then
LOCATION="PR#${{ github.event.pull_request.number }}"
SHORT_SHA=$(cut -c 1-7 <<< "${{ github.event.pull_request.head.sha }}")
else
LOCATION="${{ github.ref_name }}"
SHORT_SHA=$(cut -c 1-7 <<< "${{ github.sha }}")
fi
VITE_EXTRA_VERSION_INFO="${LOCATION} @ ${SHORT_SHA}" \
npm run browser:build -- --base ./ --outDir $(pwd)/dist_preview/editor
- name: Upload artifact
Expand Down

0 comments on commit 298b7dd

Please sign in to comment.