Skip to content

Commit

Permalink
Merge branch 'mwong-add-preview-link' into test-preview-link-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Sep 20, 2024
2 parents 6daef22 + 0320862 commit 5f889a9
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/preview-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
<!-- vercel-preview-comment -->
🚀 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
});

0 comments on commit 5f889a9

Please sign in to comment.