Skip to content

Commit 4f7aaa7

Browse files
committed
fix: fixing deployment location for PRs
1 parent c53924a commit 4f7aaa7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/jekyll.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ jobs:
7676
RAW=$(gh api -H "Accept: application/vnd.github+json" \
7777
repos/${{ github.repository }}/pages/deployments \
7878
--method GET --paginate -f per_page=1)
79-
URL=$(python - <<'PY'
80-
import json,sys
81-
data=json.loads(sys.stdin.read())
82-
if isinstance(data,list) and data:
83-
print(data[0].get('page_url') or '')
84-
else:
85-
print('')
86-
PY
87-
<<< "$RAW")
79+
URL=$(echo "$RAW" | python - <<'PY'
80+
import json, sys
81+
data = json.loads(sys.stdin.read())
82+
if isinstance(data, list) and data:
83+
print(data[0].get('page_url') or '')
84+
else:
85+
print('')
86+
PY
87+
)
8888
if [ -n "$URL" ]; then
8989
if [ "${{ github.event_name }}" = "pull_request" ]; then
9090
echo "Preview deployment URL: $URL" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)