Skip to content

Commit 5ce9370

Browse files
committed
Use peaceiris/actions-gh-pages@v4
Switching from using an Actions workflow entirely to publish the Pages site back to the classic "deploy from a branch" experience. This workflow then runs after that and adds a `javadoc` folder in their with the generated Javadocs. Ideally.
1 parent a88583c commit 5ce9370

2 files changed

Lines changed: 44 additions & 73 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Javadocs to GitHub Pages
2+
permissions:
3+
contents: write
4+
pages: write
5+
id-token: write
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- develop
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '17'
22+
distribution: 'adopt'
23+
- name: Change wrapper permissions
24+
run: chmod +x pi4micronaut-utils/gradlew
25+
- name: Setup Gradle
26+
uses: gradle/gradle-build-action@v2
27+
with:
28+
arguments: build
29+
build-root-directory: pi4micronaut-utils/
30+
- name: Generate Javadocs
31+
working-directory: pi4micronaut-utils
32+
run: ./gradlew javadoc
33+
deploy:
34+
runs-on: ubuntu-latest
35+
needs: build
36+
steps:
37+
- name: Deploy
38+
uses: peaceiris/actions-gh-pages@v4
39+
if: github.ref == 'refs/heads/develop'
40+
with:
41+
github_token: ${{ secrets.CI_GITHUB_TOKEN }}
42+
publish_dir: ./pi4micronaut-utils/build/docs/javadoc
43+
destination_dir: javadoc
44+
keep_files: true

0 commit comments

Comments
 (0)