Skip to content

Commit

Permalink
ci: update documentation management job with MkDocs (#598)
Browse files Browse the repository at this point in the history
* ci: update documentation management job with MkDocs

Signed-off-by: Tetiana Naumenko <[email protected]>

* ci: move docs management to separate manual workflow

Signed-off-by: Tetiana Naumenko <[email protected]>

* chore: update versions of used actions

Signed-off-by: Tetiana Naumenko <[email protected]>

---------

Signed-off-by: Tetiana Naumenko <[email protected]>
  • Loading branch information
t-naumenko authored Sep 10, 2024
1 parent dce00d7 commit b17a9d6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 33 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build & Publish Documentation

on:
workflow_dispatch:

permissions:
contents: read

jobs:
generate-and-publish-mkdocs:
name: Build and Publish Updated Docs
runs-on: ubuntu-latest

permissions:
contents: write
pages: write

steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install required packages
run: pip install mkdocs mkdocs-material neoteroi-mkdocs pymdown-extensions
- name: Build website
run: |
cd doc
mkdocs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/site
33 changes: 0 additions & 33 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,39 +121,6 @@ jobs:
files: |
${{ needs.build.outputs.version }}
# Generate and Publish Javadoc
generate-and-publish-javadoc:
name: Generate and Publish Javadoc
runs-on: ubuntu-latest

permissions:
contents: write
pages: write

steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build and generate Javadoc
run: |
mvn clean install javadoc:javadoc -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site/apidocs

# Publish package to GitHub Packages
publish_package:
name: Publish package to GitHub Packages
Expand Down

0 comments on commit b17a9d6

Please sign in to comment.