From 0320862d909272441eee5c1d5acf84d1259a0c75 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 20 Sep 2024 17:33:15 +0100 Subject: [PATCH] add --- .github/workflows/preview-link.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/preview-link.yml b/.github/workflows/preview-link.yml index 4353f20f080..733c243ec85 100644 --- a/.github/workflows/preview-link.yml +++ b/.github/workflows/preview-link.yml @@ -107,18 +107,11 @@ jobs: echo "links=$LINKS" >> $GITHUB_OUTPUT - name: Post comment with deployment link - uses: actions/github-script@v6 + uses: peter-evans/create-or-update-comment@v4 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const { github, context } = require('@actions/github'); - const issue_number = context.payload.pull_request.number; - const body = ` + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body: | + 🚀 Deployment available! Here are the direct links to the updated files: ${{ steps.links.outputs.links }} - `; - await github.rest.issues.createComment({ - ...context.repo, - issue_number, - body: body - });