Skip to content

Commit

Permalink
Add GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Nov 6, 2024
1 parent 83197ff commit 888e495
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Code Quality Checks

on:
push:
pull_request:

jobs:
quality:
name: Code Quality
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "astro preview",
"astro": "astro",
"generate-schema": "dotenv -c -- bash -c 'gql.tada generate schema https://graphql.datocms.com --header \"X-Exclude-Invalid: true\" --header \"Authorization: $DATOCMS_API_TOKEN\"'",
"lint": "prettier --check .",
"lint": "astro check && prettier --check .",
"format": "npx prettier . --write",
"heroku-postbuild": "npm run build && npm run fastly:purge_all",
"fastly:purge_all": "dotenv -c -- bash -c 'curl -i -X POST \"https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all\" -H \"Fastly-Key: $FASTLY_KEY\" -H \"Accept: application/json\"'"
Expand Down

0 comments on commit 888e495

Please sign in to comment.