diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..8049558e --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,38 @@ +name: GitHub Pages + +on: + push: +# TODO: uncomment before merging +# branches: +# - main + +jobs: + build: + name: Build Javadoc + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 + with: + java-version: "21" + distribution: "temurin" + - run: ./gradlew --no-daemon javadoc + - uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 + with: + path: build/docs/javadoc + + deploy: + needs: build + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-22.04 + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42