File tree Expand file tree Collapse file tree
actions/build-documentation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : ' Build the documentation'
22description : ' Build static and API documentation.'
33
4+ inputs :
5+ context_label :
6+ description : ' Label describing the build context (e.g., "master branch" or "PR #123")'
7+ required : true
8+
49runs :
510 using : ' composite'
611 steps :
1823 - name : Copy static pages
1924 shell : bash
2025 run : cp -r public/docs build
26+ - name : Apply template placeholders
27+ shell : bash
28+ run : |
29+ sed -i "s/@CONTEXT@/${{ inputs.context_label }}/g" build/docs/index.html
30+ sed -i "s/@DATE@/$(date -u +%Y-%m-%dT%H:%M:%SZ)/g" build/docs/index.html
Original file line number Diff line number Diff line change 2020 - uses : actions/checkout@v6
2121 - name : Build documentation
2222 uses : ./.github/actions/build-documentation
23+ with :
24+ context_label : PR ${{ github.event.pull_request.number }}
2325 - name : Upload
2426 uses : actions/upload-artifact@v7
2527 with :
Original file line number Diff line number Diff line change 2828 - uses : actions/checkout@v6
2929 - name : Build documentation
3030 uses : ./.github/actions/build-documentation
31+ with :
32+ context_label : master branch
3133 - name : Upload artifact for GitHub Pages
3234 uses : actions/upload-pages-artifact@v4
3335 with :
Original file line number Diff line number Diff line change 2222 mkdir site
2323 cp -r public/surge/* site/
2424 sed -i "s/@PR_NUMBER@/${PR_NUMBER}/g" site/index.html
25+ sed -i "s/@DATE@/$(date -u +%Y-%m-%dT%H:%M:%SZ)/g" site/index.html
2526
2627 - name : Upload artifact
2728 uses : actions/upload-artifact@v7
Original file line number Diff line number Diff line change 3636 mkdir site
3737 cp -r public/surge/* site/
3838 sed -i "s/@PR_NUMBER@/${PR_NUMBER}/g" site/index.html
39+ sed -i "s/@DATE@/$(date -u +%Y-%m-%dT%H:%M:%SZ)/g" site/index.html
3940 - name : Publish Demo preview
4041 if : steps.surge-preview-tools.outputs.can-run-surge-command == 'true'
4142 id : publish_demo_preview
Original file line number Diff line number Diff line change 22< html lang ="en ">
33< head >
44 < meta charset ="utf-8 ">
5- < title > Process Analytics Playground site</ title >
5+ < title > Process Analytics Playground site (@CONTEXT@) </ title >
66</ head >
77< body >
88< section >
9- < h1 > Process Analytics Playground site</ h1 >
9+ < h1 > Process Analytics Playground site (@CONTEXT@) </ h1 >
1010 < p > Have a look at an example of the < a href ="api/ "> documentation of an TypeScript API generated with Typedoc</ a > </ p >
1111</ section >
12- < footer > Process Analytics - 2021-present</ footer >
12+ < footer > Process Analytics - 2021-present (built on @DATE@) </ footer >
1313</ body >
1414</ html >
Original file line number Diff line number Diff line change 99 < h1 > Process Analytics Playground site for PR @PR_NUMBER@</ h1 >
1010 < p > This page has been created to test < a href ="https://surge.sh/ "> Surge</ a > deployments.</ p >
1111</ section >
12- < footer > Process Analytics - 2021-present</ footer >
12+ < footer > Process Analytics - 2021-present (built on @DATE@) </ footer >
1313</ body >
1414</ html >
You can’t perform that action at this time.
0 commit comments