docs: revamp installation docs for esm and umd (#1788) #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ESLint Check | |
| on: | |
| push: | |
| pull_request_target: | |
| jobs: | |
| eslint_check_upload: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| name: ESLint Check and Report Upload | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.head_ref }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: lts/* | |
| cache: 'yarn' | |
| - name: Install Dependencies | |
| run: yarn install --frozen-lockfile | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: true | |
| - name: Build Packages | |
| run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all | |
| - name: Eslint Check | |
| run: yarn turbo run lint | |
| - name: Save Code Linting Report JSON | |
| run: yarn lint:report | |
| # Continue to the next step even if this fails | |
| continue-on-error: true | |
| - name: Upload ESLint Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eslint_report.json | |
| path: eslint_report.json | |
| annotation: | |
| # Skip the annotation action in push events | |
| if: github.event_name == 'pull_request_target' | |
| permissions: | |
| checks: write | |
| needs: eslint_check_upload | |
| runs-on: ubuntu-latest | |
| name: ESLint Annotation | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: eslint_report.json | |
| - name: Annotate Code Linting Results | |
| uses: ataylorme/eslint-annotate-action@v2 | |
| with: | |
| repo-token: '${{ secrets.GITHUB_TOKEN }}' | |
| report-json: 'eslint_report.json' | |
| bundle_size: | |
| # Only runs on PRs (needs a base branch to compare against) | |
| if: github.event_name == 'pull_request_target' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| name: Check Bundle Sizes | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.head_ref }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: lts/* | |
| cache: 'yarn' | |
| - name: Check bundle sizes | |
| uses: preactjs/compressed-size-action@v2 | |
| with: | |
| install-script: 'yarn install --frozen-lockfile' | |
| build-script: 'build:all' | |
| compression: 'none' | |
| pattern: '**/dist/*.{js,cjs,mjs,css}' | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: true |