Update docs #713
This file contains hidden or 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@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Setup MkDocs | |
| run: pip3 install mkdocs mkdocs-material mkdocs-macros-plugin | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 22 | |
| distribution: 'temurin' | |
| - name: Checkout java-gi repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: 'jwharm/java-gi' | |
| path: 'java-gi' | |
| submodules: 'true' | |
| - name: Install dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: > | |
| meson | |
| pkg-config | |
| libglib2.0-dev | |
| libgirepository1.0-dev | |
| libcairo2-dev | |
| libgtk-4-dev | |
| xvfb | |
| version: 1.0 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Run Gradle build | |
| working-directory: java-gi/ | |
| run: | | |
| Xvfb :100 -ac & | |
| export DISPLAY=:100.0 | |
| ./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@v4 | |
| 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 |