Skip to content

Commit

Permalink
Build aangepast
Browse files Browse the repository at this point in the history
  • Loading branch information
brienen committed Feb 6, 2024
1 parent 9c84f4c commit 38c9927
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
name: Build
uses: Logius-standaarden/Automatisering/.github/workflows/build.yml@snapshot-in-repo
uses: .github/workflows/mybuild.yml@snapshot-in-repo
check:
needs: build
name: Check
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/mybuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build
on:
workflow_call:
jobs:
main:
name: Snapshot
runs-on: ubuntu-latest
steps:
- run: mkdir ~/static
- name: Create cache
uses: actions/cache@v3
with:
path: ~/static
key: ${{ github.run_id }}
- uses: actions/checkout@v3
- name: Static HTML
run: |
npx respec --localhost --src index.html --out ~/static/snapshot.html
cp ~/static/snapshot.html snapshot.html
- name: PDF
if: ${{ github.event_name != 'pull_request'}}
run: |
cp ./js/config.js config.js
echo "module.exports = { respecConfig };" >> config.js
echo "var window = {respecMermaid : {createFigures : null}};" | cat - config.js > temp && mv temp config.js
cp ~/static/snapshot.html snapshot.html
npm i puppeteer
python3 -m http.server 8080 &
wget https://raw.githubusercontent.com/Logius-standaarden/Automatisering/main/scripts/pdf.js
rm -f *.pdf
node pdf.js
find *.pdf
mv *.pdf ~/static/

0 comments on commit 38c9927

Please sign in to comment.