Skip to content

Commit a48fa27

Browse files
authored
コメントを上書き方式にする
1 parent 4814a22 commit a48fa27

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/preview.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
run: |
1919
REPO="${GITHUB_REPOSITORY}"
20-
PR_NUM="${{ github.event.pull_request.number }}"
2120
BRANCH="${{ github.event.pull_request.head.ref }}"
2221
2322
PREVIEW_URL="https://htmlpreview.github.io/?https://raw.githubusercontent.com/${REPO}/refs/heads/${BRANCH}/index.html"
2423
25-
COMMENT="🚀 Preview ready: ${PREVIEW_URL}"
24+
echo "PREVIEW_URL=${PREVIEW_URL}" >> $GITHUB_ENV
2625
27-
gh pr comment "$PR_NUM" --body "$COMMENT"
26+
- uses: marocchino/sticky-pull-request-comment@v2
27+
with:
28+
message: |
29+
🚀 Preview ready:
30+
${{ env.PREVIEW_URL }}

0 commit comments

Comments
 (0)