From 27def52c795a93bc7983bcfa352332d6292d9b26 Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Fri, 29 Dec 2023 16:46:59 -0500 Subject: [PATCH] Revert "build: Stop publishing doc updates from v8 branch (#329)" This reverts commit 99c096bab3784f25596f627eeaa53209a17c7e0d. --- .github/actions/publish-docs/action.yml | 15 +++++++++++++ .github/workflows/manual-publish-docs.yml | 26 +++++++++++++++++++++++ .github/workflows/release-please.yml | 5 +++++ 3 files changed, 46 insertions(+) create mode 100644 .github/actions/publish-docs/action.yml create mode 100644 .github/workflows/manual-publish-docs.yml diff --git a/.github/actions/publish-docs/action.yml b/.github/actions/publish-docs/action.yml new file mode 100644 index 00000000..31a360a5 --- /dev/null +++ b/.github/actions/publish-docs/action.yml @@ -0,0 +1,15 @@ +name: Publish Documentation +description: 'Publish the documentation to GitHub pages' +inputs: + token: + description: 'Token to use for publishing.' + required: true + +runs: + using: composite + steps: + - uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1 + name: 'Publish to GitHub pages' + with: + docs_path: docs + github_token: ${{ inputs.token }} diff --git a/.github/workflows/manual-publish-docs.yml b/.github/workflows/manual-publish-docs.yml new file mode 100644 index 00000000..2d21f3a3 --- /dev/null +++ b/.github/workflows/manual-publish-docs.yml @@ -0,0 +1,26 @@ +on: + workflow_dispatch: + +name: Publish Documentation +jobs: + build-publish: + runs-on: macos-13 + + permissions: + id-token: write # Needed if using OIDC to get release secrets. + contents: write # Needed in this case to write github pages. + + steps: + - uses: actions/checkout@v4 + + - name: Build and Test + uses: ./.github/actions/ci + with: + xcode-version: 14.3.1 + ios-sim: 'platform=iOS Simulator,name=iPhone 14,OS=16.4' + + - uses: ./.github/actions/build-docs + + - uses: ./.github/actions/publish-docs + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 52d0216b..f3219391 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -57,3 +57,8 @@ jobs: with: token: ${{secrets.GITHUB_TOKEN}} dry_run: false + + - uses: ./.github/actions/publish-docs + if: ${{ steps.release.outputs.releases_created == 'true' }} + with: + token: ${{secrets.GITHUB_TOKEN}}