-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (32 loc) · 1006 Bytes
/
diff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Diff HTML pages
# Triggers the workflow only for pull requests
on:
pull_request:
jobs:
diff:
runs-on: ubuntu-22.04
strategy:
matrix:
php:
- 8.1
steps:
# check out base ref and build site into old/
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- run: make && mv build/ old/
# check out head ref and build site into new/
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
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