Skip to content

Commit

Permalink
Only deploy if code formatting is correct, but separately check both …
Browse files Browse the repository at this point in the history
…code and data formatting

Checking data formatting takes a long time because "prettier" is not efficient. It makes sense to look for a faster linter and to configure it to use the same rules.
  • Loading branch information
specious committed Aug 3, 2022
1 parent 1b312fe commit dcb61c2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@ on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Ensure code formatting
run: |
npm run check
- name: Create 404.html alias for index.html
run: |
ln -s public/index.html public/404.html
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check Code And Data Formatting

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run code and data formatting checks
run: |
npm ci
npm run check
npm run check-data
19 changes: 0 additions & 19 deletions .github/workflows/prettier.yml

This file was deleted.

0 comments on commit dcb61c2

Please sign in to comment.