Skip to content

Commit

Permalink
Normalise the JSON redirects file before diffing
Browse files Browse the repository at this point in the history
This ensures that key-ordering changes, which don't affect the
semantics of the file, don't create diff noise.
  • Loading branch information
PeterJCLaw committed Aug 3, 2024
1 parent b92333b commit ed7d2b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ jobs:
name: build-from-main
path: main

- name: Normalise JSON
shell: python
run: |
import json
from pathlib import Path
p = Path('_site') / 'redirects.json'
p.write_text(json.dumps(
json.loads(p.read_text()),
sort_keys=True,
))
- name: Diff
id: diff
run: |
Expand Down

0 comments on commit ed7d2b4

Please sign in to comment.