File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ jobs:
1313
1414 - name : Static HTML
1515 run : |
16- npx respec --localhost --src index.html --out static/ snapshot.html
16+ npx respec --localhost --src index.html --out snapshot.html
1717
1818 - name : Validate HTML with W3C
1919 run : |
2020 npm install -g nu-html-checker
21- nu-html-checker static/ snapshot.html
21+ nu-html-checker snapshot.html
2222
2323 - name : Check config
2424 id : config
4040 cp ./js/config.js config.js
4141 echo "module.exports = { respecConfig };" >> config.js
4242 echo "var window = {respecMermaid : {createFigures : null}};" | cat - config.js > temp && mv temp config.js
43- cp static/snapshot.html snapshot.html
4443 npm i puppeteer
4544 python3 -m http.server 8080 &
4645 rm -f *.pdf
5655 - name : Commit snapshot
5756 if : ${{ steps.config.outputs.grep == 'true' }}
5857 run : |
59- git add static/*
58+ git add snapshot.html static/*
6059 git commit -m "Snapshot gegenereerd" || echo "No changes to commit"
6160 git push
6261
6665 with :
6766 name : snapshot-files
6867 path : |
69- static/ snapshot.html
68+ snapshot.html
7069 static/*.pdf
Original file line number Diff line number Diff line change @@ -138,13 +138,22 @@ jobs:
138138 mkdir -p docs.geostandaarden.nl/${{ steps.metadata.outputs.folderPath }}
139139 cp -r content/* docs.geostandaarden.nl/${{ steps.metadata.outputs.folderPath }}/
140140 rm docs.geostandaarden.nl/${{ steps.metadata.outputs.folderPath }}/js/config.js
141+ - name : Bepaal doelbranch voor PR
142+ id : branch
143+ run : |
144+ if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
145+ echo "branch=develop" >> $GITHUB_OUTPUT
146+ else
147+ echo "branch=main" >> $GITHUB_OUTPUT
148+ fi
149+
141150 - name : Create PR
142151 uses : peter-evans/create-pull-request@v5
143152 with :
144153 token : ${{ secrets.GH_PUSH_TOKEN }}
145154 path : docs.geostandaarden.nl
146155 branch : auto-update-${{ github.run_id }}
147- base : main
156+ base : ${{ steps.branch.outputs.branch }}
148157 author : ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
149158 title : " Automated update from ${{ github.repository }}"
150159 body : |
You can’t perform that action at this time.
0 commit comments