diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml new file mode 100644 index 0000000..c34cd7c --- /dev/null +++ b/.github/workflows/pull.yml @@ -0,0 +1,38 @@ +name: Pull request + +on: + pull_request: + branches: ['**'] + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + packages: write + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install + run: | + npm ci + + - name: Build + run: | + npm run build + + - name: Check formatting + run: | + npm run format:check + + - name: Run Next lint + run: | + npm run lint diff --git a/package.json b/package.json index 1b7aa04..f04e0d8 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lint": "next lint", "format:check": "prettier --check --ignore-path .prettierignore --ignore-path .gitignore .", "format:fix": "prettier --write --ignore-path .prettierignore --ignore-path .gitignore .", - "prepare": "husky", + "postinstall": "husky", "commit": "git-cz" }, "config": {