Skip to content

Commit

Permalink
show output in step summary
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Jun 10, 2024
1 parent 1324224 commit 7a2b300
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
default:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,21 +25,6 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
preview_url=$(make --silent -C ./docs netlify | tail -n 1)
echo "preview_url=$preview_url" >> $GITHUB_OUTPUT
- uses: actions/github-script@v6
env:
preview_url: ${{ steps.netlify.outputs.preview_url }}
with:
script: |
const url = process.env.preview_url;
const issue_number = context.payload.pull_request.number;
const repo = context.repo.repo;
const owner = context.repo.owner;
console.log(`🚀 Check out the documentation site for preview [here](${url}).`)
github.rest.issues.createComment({
owner,
repo,
issue_number,
body: `🚀 Check out the documentation site for preview [here](${url}).`
})
preview_url=$(make --silent -C ./docs netlify | tail -n 1 | tr -d '"')
echo "# 🚀 Site Preview" >> $GITHUB_STEP_SUMMARY
echo "$preview_url" >> $GITHUB_STEP_SUMMARY

0 comments on commit 7a2b300

Please sign in to comment.