From 5ed46a1ffec58a123dd18c23380893d01e9e584d Mon Sep 17 00:00:00 2001 From: Niek van der Maas Date: Mon, 20 Mar 2023 13:50:35 +0100 Subject: [PATCH] Add linting action --- .github/workflows/lint.yml | 21 +++++++++++++++++++++ .github/workflows/pages.yml | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..61e266d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: Linting + +# Run on PRs only +on: + pull_request: + types: [opened, reopened] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Lint + run: npm ci && npm run lint \ No newline at end of file diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index e9eadd5..026d04d 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -23,7 +23,7 @@ jobs: node-version: '18' - name: Build - run: npm ci && npm run build:github + run: npm ci && npm run lint && npm run build:github - name: Deploy uses: peaceiris/actions-gh-pages@v3