Skip to content

Commit

Permalink
features(documentation): deploy doc only if there is an update
Browse files Browse the repository at this point in the history
  • Loading branch information
dixxond committed Dec 4, 2024
1 parent f420760 commit c44a122
Showing 1 changed file with 55 additions and 4 deletions.
59 changes: 55 additions & 4 deletions .github/workflows/buildGithubPage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,64 @@ on:
- "features/dka/docs"

jobs:
publish-documentation:

check-changes-api-doc:
name: Check for changes in api documentation
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: dorny/paths-filter@v3
id: api-doc-change
with:
filters: |
src:
- 'api/**'
check-changes-client-doc:
name: Check for changes in client documentation
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: dorny/paths-filter@v3
id: client-doc-change
with:
filters: |
src:
- 'client/**'
publish-api-documentation:
name: Publish api documentation
if: steps.api-doc-change.outputs.src == 'true'
permissions:
id-token: "write"
pages: "write"

runs-on: "ubuntu-latest"


steps:
- id: "checkout"
name: "Check out Git repository"
uses: "actions/checkout@v3"

- id: "upload-documentation"
name: "Upload Pages artifact"
uses: "actions/upload-pages-artifact@v2"
with:
path: "api/"

- id: "deployment"
name: "Deploy documentation to GitHub Pages"
uses: "actions/deploy-pages@v2"

publish-client-documentation:
name: Publish client documentation
if: steps.client-doc-change.outputs.src == 'true'
permissions:
id-token: "write"
pages: "write"

runs-on: "ubuntu-latest"

steps:
- id: "checkout"
name: "Check out Git repository"
Expand All @@ -21,7 +72,7 @@ jobs:
name: "Upload Pages artifact"
uses: "actions/upload-pages-artifact@v2"
with:
path: "docs/"
path: "client/"

- id: "deployment"
name: "Deploy documentation to GitHub Pages"
Expand Down

0 comments on commit c44a122

Please sign in to comment.