Skip to content

PR Review Dashboard #139

PR Review Dashboard

PR Review Dashboard #139

name: PR Review Dashboard
on:
push:
branches:
- develop
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
deployments: write
steps:
- name: Delete Deployment Environment
continue-on-error: true
uses: strumwolf/delete-deployment-environment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: github-pages
onlyRemoveDeployments: true
deploy:
needs: cleanup
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- run: pip install requests
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.GH_APP_MIGRAPHX_BOT_PR_WRITE_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_MIGRAPHX_BOT_PR_WRITE_PRIVATE_KEY }}
- name: Generate data.json
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: python tools/pr_review_dashboard/pr-review-status.py --json > tools/pr_review_dashboard/data.json
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: tools/pr_review_dashboard
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5