Merge pull request #188 from JFronny/ci-adwaita #442
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 package | |
on: | |
release: | |
types: [created] | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Setup MkDocs | |
run: pip3 install mkdocs mkdocs-material mkdocs-macros-plugin | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 22 | |
distribution: 'temurin' | |
- name: Checkout java-gi repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 'jwharm/java-gi' | |
path: 'java-gi' | |
submodules: 'true' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Run Gradle build | |
working-directory: java-gi/ | |
run: ./gradlew build javadoc | |
- name: Run Mkdocs build | |
working-directory: java-gi/ | |
run: mkdocs build | |
- name: Move generated Javadoc to website | |
run: | | |
mv java-gi/site site | |
mv java-gi/build/docs/javadoc site/javadoc | |
- name: Upload Site Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'site' | |
pages: | |
runs-on: ubuntu-latest | |
needs: publish | |
if: github.event_name == 'push' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |