diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml new file mode 100644 index 0000000..c14c6db --- /dev/null +++ b/.github/workflows/build-check.yml @@ -0,0 +1,28 @@ +name: Build check + +on: + push: + branches: + - main + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 22 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + # Building the docs also means building the core library + - name: Build everything + run: npm run docs:build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index be93d7e..3f4fbc7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,14 +27,4 @@ jobs: run: npm run check - name: Run ESLint - run: npm run lint - - - name: Run build - run: npm run build - - - name: Generate API docs - run: npm run docs:generate - - # We do this because we want to surface doc-building errors early - - name: Build docs - run: vitepress build docs + run: npm run lint \ No newline at end of file