From d535b607efde749aaca3937b4853075870494b9b Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:28:15 -0400 Subject: [PATCH] test(ci): add build workflow to catch build errors in CI (#469) * test(ci): add build workflow to catch build errors in CI * fix(build): add type modules to package.json to resolve ESM error --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ README.md | 2 ++ package.json | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..450ceabdb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build VitePress Site + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: yarn # or pnpm / npm + - name: Install dependencies + run: yarn install # or pnpm install / npm ci + - name: Build with VitePress + run: yarn docs:build # or pnpm docs:build / npm docs:build diff --git a/README.md b/README.md index 75d7dfb94..96c418a75 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Deploy](https://github.com/rollkit/docs/actions/workflows/deploy.yml/badge.svg)](https://github.com/rollkit/docs/actions/workflows/deploy.yml) + # Rollkit Documentation Site Welcome to the official documentation repository for Rollkit. diff --git a/package.json b/package.json index d055da21f..473074d26 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,6 @@ }, "dependencies": { "node-fetch": "^3.3.2" - } + }, + "type": "module" }