GH-Pages CI #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GH-Pages CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
jobs: | |
publish-pages: | |
name: Publish dependencies and licenses to github pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup - Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
- name: Build dependencies/licenses files | |
run: mvn -B project-info-reports:dependencies | |
- name: Upload licenses - Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dependencies-licenses | |
path: target/site | |
- name: Generate docs/dependencies dir | |
run: mkdir -p docs/dependencies | |
- name: Move built files into docs/dependencies | |
run: mv target/site/* docs/dependencies | |
- name: Rename dependencies.html to index.html | |
working-directory: docs/dependencies | |
run: mv dependencies.html index.html | |
- name: Copy Readme into docs (as index.md) | |
run: cp README.md docs/index.md | |
- name: Configure Pages | |
working-directory: docs | |
run: |- | |
echo "theme: jekyll-theme-midnight" > _config.yml | |
- name: Deploy to Github pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
enable_jekyll: true |