Skip to content

Jackw/bundle size workflow #7

Jackw/bundle size workflow

Jackw/bundle size workflow #7

Workflow file for this run

name: Bundle Stats
on:
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
actions: read
jobs:
compare:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.jsgit
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build project to generate PR stats
run: npm run build -- --profile --json pr-stats.json
- name: Download main branch stats artifact
uses: actions/download-artifact@v4
with:
name: main-branch-stats
github-token: ${{ secrets.GH_PAT_TOKEN }}
run-id: 11436425509
- name: debug
run: ls -R .
- name: Generate stats report and comment on PR
uses: actions/github-script@v6
with:
script: |
const script = require('.github/scripts/compareStats.js')
await script({github, context, core}, "main-branch-stats/stats.json", "pr-stats.json")