diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 471e69e..9c45b9f 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -8,6 +8,8 @@ jobs: capture_vercel_preview_url: name: Capture Vercel preview URL runs-on: "ubuntu-latest" + permissions: + pull-requests: write steps: - uses: aaimio/vercel-preview-url-action@main id: vercel_preview_url @@ -15,13 +17,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Below is merely an example of what you could do with the preview URL. # The preview URL is accessed through ${{ steps..outputs.vercel_preview_url }} - - uses: actions/github-script@v6 + - uses: marocchino/sticky-pull-request-comment@v2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'The preview URL is: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}.' - }); + message: | + The preview URL is: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}.