Skip to content

chore: drop CommonJS distribution. #248

chore: drop CommonJS distribution.

chore: drop CommonJS distribution. #248

Workflow file for this run

name: compare llms-full.txt
permissions:
contents: read
on:
pull_request:
paths:
- '.github/workflows/compare.yml'
- 'site/**'
workflow_dispatch:
jobs:
build-current:
name: Build current branch
runs-on: ubuntu-latest
outputs:
artifact-name: current-llms-full-txt
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- name: Use Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: 'pnpm'
node-version: lts/*
- name: Install dependencies
run: pnpm install
- name: Build
working-directory: site
run: pnpm build
- name: Upload current build artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: current-llms-full-txt
path: site/build/llms-full.txt
build-target:
name: Build target branch
runs-on: ubuntu-latest
outputs:
artifact-name: target-llms-full-txt
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- name: Use Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: 'pnpm'
node-version: lts/*
- name: Install dependencies
run: pnpm install
- name: Checkout target branch and build
run: |
TARGET_BRANCH=${{ github.event.pull_request.base.ref || 'master' }}
git fetch origin $TARGET_BRANCH:$TARGET_BRANCH
git checkout $TARGET_BRANCH
pnpm install
cd site && pnpm build
- name: Upload target build artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: target-llms-full-txt
path: site/build/llms-full.txt
diff:
name: Diff current branch vs. target branch
runs-on: ubuntu-latest
needs: [build-current, build-target]
steps:
- name: Download current build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: current-llms-full-txt
path: current/
- name: Download target build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: target-llms-full-txt
path: target/
- name: Diff current vs. target
uses: LouisBrunner/diff-action@9ea7b75986aa27143ad4928974c98a5a1bd92170 # v2.2.0
with:
mode: addition
new: current/llms-full.txt
old: target/llms-full.txt
output: diff-llms-full.txt
tolerance: mixed