fix publishing workflow (2) #36
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
on: | |
push: | |
branches: [ master ] | |
concurrency: | |
group: "docs" | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
docs: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
check-latest: true | |
java-version: 22 | |
cache: 'gradle' | |
- name: Validate gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Update docs/README.md | |
run: cp ./README.md ./docs/README.md | |
- name: Generate docs | |
run: ./gradlew :dokkaHtmlMultiModule --no-configuration-cache | |
- name: Move docs to the parent docs dir | |
run: cp -r ./build/dokka/htmlMultiModule/ ./docs/javadocs/ | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './docs/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |