# HG changeset patch # User Da Risk # Date 1746405746 14400 # Node ID f71bc296e23d40be2ad8b9a2af28388f77ee4f39 # Parent bcfc8238b4f61639f2437ec4275eeddbd3470c84 build: add workflow to publish-website diff -r bcfc8238b4f6 -r f71bc296e23d .github/workflows/publish-website.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.github/workflows/publish-website.yaml Sun May 04 20:42:26 2025 -0400 @@ -0,0 +1,49 @@ +# .github/workflows/publish.yml + +name: Publish website +on: + workflow_dispatch: + release: + types: [released, prereleased] + +jobs: + build-doc: + name: Build doc + runs-on: macOS-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build api doc + run: ./gradlew :dokka:dokkaGenerate + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: pip install mkdocs-material + - name: Build site + run: mkdocs build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: site + + publish-doc: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build-doc + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff -r bcfc8238b4f6 -r f71bc296e23d .github/workflows/publish.yaml --- a/.github/workflows/publish.yaml Sun May 04 17:15:06 2025 -0400 +++ b/.github/workflows/publish.yaml Sun May 04 20:42:26 2025 -0400 @@ -6,8 +6,8 @@ release: types: [released, prereleased] jobs: - publish: - name: Release build and publish + build: + name: Build release runs-on: macOS-latest steps: - name: Check out code @@ -17,6 +17,25 @@ with: distribution: 'zulu' java-version: 21 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build release + run: ./gradlew build + + publish: + name: Publish release + needs: build + runs-on: macOS-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: Publish to MavenCentral run: ./gradlew publishToMavenCentral --no-configuration-cache env: @@ -25,3 +44,4 @@ ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }} +