Skip to content

Build and Publish Docs to GitHub Pages #4

Build and Publish Docs to GitHub Pages

Build and Publish Docs to GitHub Pages #4

Workflow file for this run

name: Build and Publish Docs to GitHub Pages
on:
release:
types:
- created
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
packages: write
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'
- name: Generate Javadoc
run: mvn javadoc:aggregate -DskipTests
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: cd docs && npm ci
- run: cd docs && npm run build
- run: cp -R target/site/apidocs docs/build/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload docs
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './docs/build/.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4