From 9ce51389ebde8562a3035efda7489fd48b43e438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=A4hr?= Date: Wed, 14 Aug 2024 10:37:11 +0200 Subject: [PATCH] ci: linting added (#9) * ci: linting added * ci: fix ci path --- .github/workflows/quarto-publish.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quarto-publish.yml b/.github/workflows/quarto-publish.yml index db78d0c..eac99e0 100644 --- a/.github/workflows/quarto-publish.yml +++ b/.github/workflows/quarto-publish.yml @@ -1,4 +1,7 @@ on: + pull_request: + branches: + - main push: branches: - main @@ -12,6 +15,25 @@ permissions: pages: write jobs: + lint: + name: Lint with Prettier + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install dependencies + run: npm install + + - name: Check for linting errors + run: npm run check + build-deploy: runs-on: ubuntu-latest @@ -53,7 +75,7 @@ jobs: - name: Render Quarto Project uses: quarto-dev/quarto-actions/render@v2 with: - path: manuscript + path: . to: html - name: JamPack @@ -78,6 +100,7 @@ jobs: # NOTE: If Publishing to GitHub Pages, set the permissions correctly (see top of this yaml) - name: Publish to GitHub Pages (and render) + if: github.event_name != 'pull_request' uses: quarto-dev/quarto-actions/publish@v2 with: target: gh-pages