The GitHub actions were running everytime a new commit was made to the repo, but that wasn't needed. For example, we don't need to try to create a new docker image if the libraries didn't change, same to build the whole site after a change in the README.md. --------- Signed-off-by: George Araújo <george.gcac@gmail.com>
27 lines
632 B
YAML
27 lines
632 B
YAML
name: Prettier code formatter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check:
|
|
# available images: https://github.com/actions/runner-images#available-images
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout 🛎️
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node.js ⚙️
|
|
uses: actions/setup-node@v4
|
|
- name: Install Prettier 💾
|
|
run: npm install --save-dev --save-exact prettier @shopify/prettier-plugin-liquid
|
|
- name: Prettier Check 🔎
|
|
run: npx prettier . --check
|