Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/actions/build-documentation/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: 'Build the documentation'
description: 'Build static and API documentation.'

inputs:
context_label:
description: 'Label describing the build context (e.g., "master branch" or "PR #123")'
required: true

runs:
using: 'composite'
steps:
Expand All @@ -18,3 +23,8 @@ runs:
- name: Copy static pages
shell: bash
run: cp -r public/docs build
- name: Apply template placeholders
shell: bash
run: |
sed -i "s/@CONTEXT@/${{ inputs.context_label }}/g" build/docs/index.html
sed -i "s/@DATE@/$(date -u +%Y-%m-%dT%H:%M:%SZ)/g" build/docs/index.html
2 changes: 2 additions & 0 deletions .github/workflows/deploy-documentation-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- uses: actions/checkout@v6
- name: Build documentation
uses: ./.github/actions/build-documentation
with:
context_label: PR ${{ github.event.pull_request.number }}
- name: Upload
uses: actions/upload-artifact@v7
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- uses: actions/checkout@v6
- name: Build documentation
uses: ./.github/actions/build-documentation
with:
context_label: master branch
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/surge-pr-fork-01-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
mkdir site
cp -r public/surge/* site/
sed -i "s/@PR_NUMBER@/${PR_NUMBER}/g" site/index.html
sed -i "s/@DATE@/$(date -u +%Y-%m-%dT%H:%M:%SZ)/g" site/index.html

- name: Upload artifact
uses: actions/upload-artifact@v7
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/surge-preview-for-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
mkdir site
cp -r public/surge/* site/
sed -i "s/@PR_NUMBER@/${PR_NUMBER}/g" site/index.html
sed -i "s/@DATE@/$(date -u +%Y-%m-%dT%H:%M:%SZ)/g" site/index.html
- name: Publish Demo preview
if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true'
id: publish_demo_preview
Expand Down
6 changes: 3 additions & 3 deletions public/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Process Analytics Playground site</title>
<title>Process Analytics Playground site (@CONTEXT@)</title>
</head>
<body>
<section>
<h1>Process Analytics Playground site</h1>
<h1>Process Analytics Playground site (@CONTEXT@)</h1>
<p>Have a look at an example of the <a href="api/">documentation of an TypeScript API generated with Typedoc</a></p>
</section>
<footer>Process Analytics - 2021-present</footer>
<footer>Process Analytics - 2021-present (built on @DATE@)</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion public/surge/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<h1>Process Analytics Playground site for PR @PR_NUMBER@</h1>
<p>This page has been created to test <a href="https://surge.sh/">Surge</a> deployments.</p>
</section>
<footer>Process Analytics - 2021-present</footer>
<footer>Process Analytics - 2021-present (built on @DATE@)</footer>
</body>
</html>
Loading