forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove prettier and remove customize from brokel link link checker
- Loading branch information
Showing
2 changed files
with
47 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
name: Prettier code formatter | ||
# name: Prettier code formatter | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
push: | ||
branches: | ||
- master | ||
- main | ||
# on: | ||
# pull_request: | ||
# branches: | ||
# - master | ||
# - main | ||
# push: | ||
# branches: | ||
# - master | ||
# - main | ||
|
||
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 🔎 | ||
id: prettier | ||
run: npx prettier . --check | ||
- name: Create diff 📝 | ||
# https://docs.github.com/en/actions/learn-github-actions/expressions#failure | ||
if: ${{ failure() }} | ||
run: | | ||
npx prettier . --write | ||
git diff -- . ':(exclude)package-lock.json' ':(exclude)package.json' > diff.txt | ||
npm install -g diff2html-cli | ||
diff2html -i file -s side -F diff.html -- diff.txt | ||
- name: Upload html diff ⬆️ | ||
id: artifact-upload | ||
if: ${{ failure() && steps.prettier.conclusion == 'failure' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: HTML Diff | ||
path: diff.html | ||
retention-days: 7 | ||
- name: Dispatch information to repository 🗣️ | ||
if: ${{ failure() && steps.prettier.conclusion == 'failure' && github.event_name == 'pull_request' }} | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
event-type: prettier-failed-on-pr | ||
client-payload: '{"pr_number": "${{ github.event.number }}", "artifact_url": "${{ steps.artifact-upload.outputs.artifact-url }}", "run_id": "${{ github.run_id }}"}' | ||
# 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 🔎 | ||
# id: prettier | ||
# run: npx prettier . --check | ||
# - name: Create diff 📝 | ||
# # https://docs.github.com/en/actions/learn-github-actions/expressions#failure | ||
# if: ${{ failure() }} | ||
# run: | | ||
# npx prettier . --write | ||
# git diff -- . ':(exclude)package-lock.json' ':(exclude)package.json' > diff.txt | ||
# npm install -g diff2html-cli | ||
# diff2html -i file -s side -F diff.html -- diff.txt | ||
# - name: Upload html diff ⬆️ | ||
# id: artifact-upload | ||
# if: ${{ failure() && steps.prettier.conclusion == 'failure' }} | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: HTML Diff | ||
# path: diff.html | ||
# retention-days: 7 | ||
# - name: Dispatch information to repository 🗣️ | ||
# if: ${{ failure() && steps.prettier.conclusion == 'failure' && github.event_name == 'pull_request' }} | ||
# uses: peter-evans/repository-dispatch@v2 | ||
# with: | ||
# event-type: prettier-failed-on-pr | ||
# client-payload: '{"pr_number": "${{ github.event.number }}", "artifact_url": "${{ steps.artifact-upload.outputs.artifact-url }}", "run_id": "${{ github.run_id }}"}' |