Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Workflow file for this run

name: pr-visualizer
on:
pull_request:
permissions:
pull-requests: write
contents: read
pages: write
id-token: write
jobs:
visualizer:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install and Build
run: |
npm install
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist/visualizer/
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment
with:
branch: ${{ github.head_ref }}
- name: Find existing comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.number }}
format: 'json'
- name: Create comment
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id == '0'
with:
issue-number: ${{ github.event.number }}
body: |
# Visualizer Report
You can view the results [here](${{ steps.deployment.outputs.page_url }}).
- name: Update comment
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id != '0'
with:
issue-number: ${{ github.event.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
includes-comment: "# Visualizer Report"
body: |
# Visualizer Report
- You can view the results [here](${{ steps.deployment.outputs.page_url }}).
edit-mode: replace