Skip to content

Commit

Permalink
Cleanup publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Nov 15, 2024
1 parent add5c80 commit 9fe3935
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/actions/publish-docs/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Publish Documentation
description: 'Publish the documentation to Github pages'
inputs:
dry_run:
description: 'Is this a dry run. If so no package will be published.'
required: true
token:
description: 'Token to use for publishing.'
required: true
Expand All @@ -9,7 +12,13 @@ runs:
using: composite
steps:
- uses: launchdarkly/gh-actions/actions/[email protected]
if: ${{ inputs.dry_run == 'false' }}
name: 'Publish to Github pages'
with:
docs_path: docs
github_token: ${{ inputs.token }}
- name: Dry Run Publish
if: ${{ inputs.dry_run == 'true' }}
shell: bash
run: |
echo "This is a dry run and docs are not being published."
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ jobs:
uses: ./.github/actions/publish-docs
with:
token: ${{ secrets.GITHUB_TOKEN }}
dry_run: ${{ inputs.dry_run }}
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
publish:
needs: ['release-please']
if: ${{ needs.release-please.outputs.releases_created == 'true' }}
uses: ./.github/workflows/publish
uses: ./.github/workflows/publish.yml
with:
dry_run: false

0 comments on commit 9fe3935

Please sign in to comment.