Merge pull request #224 from renovate-bot/renovate/mockito-monorepo #311
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: Publish to GitHub Pages | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files in the docs folders and the test folders of all modules | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
src/docs/asciidoc/** | |
plantuml-generator-util/src/docs/asciidoc/** | |
plantuml-generator-util/src/test/** | |
plantuml-generator-maven-plugin/src/docs/asciidoc/** | |
plantuml-generator-maven-plugin/src/test/** | |
- name: Install Node.js | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install Antora | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: npm i antora @antora/lunr-extension | |
- name: Generate Antora Site | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: npx antora antora-playbook.yml | |
- name: Publish to GitHub Pages | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: build/site |