name: BundleWatch
on:
  push:
    branches:
      - main

jobs:
  bundle:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: |
          npm ci
          npm run build
          npx bundlewatch --max-size 100kb ./dist/**/*.js
        env:
          BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
          CI_REPO_OWNER: cheeaun
          CI_REPO_NAME: phanpy
          CI_BRANCH_BASE: main
          CI_BRANCH: main
