From 968ca96096c6c806b27c797e822c8b6bd22c3ba2 Mon Sep 17 00:00:00 2001 From: Antoine BERNIER Date: Mon, 10 Nov 2025 06:40:25 +0100 Subject: [PATCH] ci --- .github/workflows/ci.yml | 17 +++++++++++++++++ .nvmrc | 1 + docs/getting-started/introduction.mdx | 12 ++++++++++-- package.json | 3 ++- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..28bd74f4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lgtm: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: 'npm' + node-version-file: '.nvmrc' + - run: npm ci + - run: npm run lgtm diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..a914529e --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.9 \ No newline at end of file diff --git a/docs/getting-started/introduction.mdx b/docs/getting-started/introduction.mdx index f1385d59..925a5540 100644 --- a/docs/getting-started/introduction.mdx +++ b/docs/getting-started/introduction.mdx @@ -14,9 +14,17 @@ nav: 0 ## INSTALL +- Install [nvm](https://github.com/nvm-sh/nvm) - Node Version Manager, then: + +```bash +$ nvm install +$ nvm use +$ node -v # make sure your version satisfies package.json#engines.node +``` + +nb: if you want this node version to be your default nvm's one: `nvm alias default node` + ```sh -$ git clone https://github.com/pmndrs/docs.git -$ cd docs $ npm ci ``` diff --git a/package.json b/package.json index 9ca6f010..df8c9641 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,8 @@ "build": "next build", "format": "prettier -w src/", "lint": "eslint src/**/*.{ts,tsx} && prettier . --check", - "prepare": "husky" + "prepare": "husky", + "lgtm": "npm run lint && npm run format && npm run build && echo 'lgtm!' || echo 'not good to me'" }, "engines": { "node": ">=20"