@@ -19,10 +19,11 @@ jobs:
1919 run : npx respec --localhost --src index.html --out snapshot.html
2020
2121 - name : Validate HTML
22- continue-on-error : true
2322 run : |
24- npm install -g nu-html-checker
25- nu-html-checker snapshot.html
23+ docker run --rm -v "$PWD:/site" ghcr.io/validator/validator:latest \
24+ vnu --errors-only --skip-non-html --format json /site/snapshot.html \
25+ | tee $CHECK_DIR/html-validation.json
26+
2627
2728 - name : Check for alternateFormats
2829 id : config
@@ -95,11 +96,13 @@ jobs:
9596 --buffer-size 8192 > $CHECK_DIR/link-check.txt 2>&1 || echo "Geen linkfouten gevonden." > $CHECK_DIR/link-check.txt
9697
9798 - name : Commit all results
98- if : ${{ github.event_name == 'push' }}
99+ if : >
100+ github.event_name == 'push' &&
101+ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
99102 run : |
100103 git config user.name "github-actions[bot]"
101104 git config user.email "github-actions[bot]@users.noreply.github.com"
102-
105+
103106 if [[ "${{ steps.config.outputs.grep }}" == "true" ]] && ls static/*.pdf 1>/dev/null 2>&1; then
104107 mv static/*.pdf .
105108 fi
@@ -111,7 +114,9 @@ jobs:
111114 fi
112115
113116 git commit -m "Snapshot + checks gegenereerd" || echo "No changes to commit"
114- git push --force-with-lease origin HEAD:main
117+
118+ BRANCH=${GITHUB_REF#refs/heads/}
119+ git push --force-with-lease origin HEAD:"$BRANCH"
115120
116121 - name : Upload snapshot artifact
117122 uses : actions/upload-artifact@v4
0 commit comments