Skip to content

Commit

Permalink
Merge pull request #281 from dogle-scottlogic/linting
Browse files Browse the repository at this point in the history
Add GitHub Action to lint posts on PR
  • Loading branch information
chriswilty authored Nov 29, 2024
2 parents eab6971 + 20322e3 commit 3ce082c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
22 changes: 0 additions & 22 deletions .circleci/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/check-a11y-of-changed-content.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Check accessibility of changed content

on:
workflow_dispatch:
pull_request:

permissions:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint Posts

on:
pull_request:
branches:
- 'gh-pages' # Runs when a PR targets the gh-pages branch

jobs:
lint-posts:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run lint
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"url": "https://github.com/ScottLogic/blog/issues"
},
"scripts": {
"test": "node lintPosts.js",
"lint": "node lintPosts.js",
"compute-embeddings": "node scripts/generate-related/compute-embeddings.js",
"generate-related": "node scripts/generate-related/blog-metadata.js",
"remove-unused-images": "node scripts/images/remove-images.js",
Expand Down

0 comments on commit 3ce082c

Please sign in to comment.