-
Notifications
You must be signed in to change notification settings - Fork 26
40 lines (39 loc) · 1.32 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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