Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: HTML diff

on:
push:
pull_request:

jobs:
diff:
name: HTML diff
runs-on: ubuntu-22.04
steps:
- run: git config --global url."https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "git@github.com:"

# check out base ref and build site into old/
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha || github.event.repository.default_branch }}
- run: make && mv build/ old/

# clean build files to remove any leftovers before building new version
- run: make clean

# check out head ref and build site into new/
- uses: actions/checkout@v4
with:
clean: false # Prevent removing files in old/
- run: make && mv build/ new/

# Diff between old/ and new/
- name: Diff between old/ and new/
run: |
git diff --no-index --stat --color=always old/ new/ && echo No changed detected || true
diff -r -u --color=always old/ new/ || true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build: public/src/tailwind.min.css
mkdir -p source/overrides
cp overrides/* source/overrides/
docker run --rm -i -v ${PWD}/source:/docs -u $(shell id -u) squidfunk/mkdocs-material:8.1.3 build
cp -r source/build/docs/ build/
cp -r source/build/docs/ build/ && rm build/docs/sitemap.xml.gz
cp public/.htaccess public/index.html build/
cp public/src/* build/src/

Expand Down