Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add documentation to publishing. #33

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ runs:
if: steps.build.outcome == 'success' && inputs.run_tests == 'true'
shell: bash
run: ./gradlew test

- name: Build Documentation
shell: bash
run: ./gradlew javadoc
24 changes: 24 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Manual Publish Documentation
on:
workflow_dispatch:

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
id-token: read # No OIDC needed.
contents: write # For publishing documentation.
steps:
- uses: actions/checkout@v4

- name: CI check
uses: ./.github/actions/ci
with:
run_tests: 'false'
java_version: '11'

- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1
name: 'Publish to Github pages'
with:
docs_path: build/docs/javadoc
github_token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 13 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
contents: write # For publishing documentation.
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -64,3 +64,15 @@ jobs:
code_signing_keyring: 'code-signing-keyring.gpg'
sonatype_username: ${{ env.SONATYPE_USER_NAME }}
sonatype_password: ${{ env.SONATYPE_PASSWORD }}

- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1
name: 'Publish to Github pages'
if: ${{ inputs.dry_run == 'false' }}
with:
docs_path: build/docs/javadoc
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Dry Run Publish Docs
shell: bash
if: ${{ inputs.dry_run == 'true' }}
run: echo "Dry run. Not publishing docs."