-
Notifications
You must be signed in to change notification settings - Fork 19
44 lines (35 loc) · 1.12 KB
/
validate.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
37
38
39
40
41
42
43
44
name: Site Validation
on:
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
env:
Codeql.Enabled: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore NPM cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Sync Package Metadata
run: sh scripts/syncMetadata.sh
- name: Rebuild and validate website
run: scripts/rebuild.sh
- name: Commit Results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add commit.txt
git commit -m 'Data Updated' || echo 'No changes to commit'
git push origin || echo "No changes to commit"
- name: Check for differences
run: |
if ! git diff --quiet; then
echo "::error ::Detected changes when regenerating website."
git diff --stat
exit 1
fi