From 249f7384514d829167e49a3d94fb79a433c25d27 Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Thu, 7 Nov 2024 17:15:03 -0700 Subject: [PATCH] feat: add redirect workflow to book --- .github/artifact_redirect.yml | 18 ------------------ .github/workflows/artifact_redirect.yml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 18 deletions(-) delete mode 100644 .github/artifact_redirect.yml create mode 100644 .github/workflows/artifact_redirect.yml diff --git a/.github/artifact_redirect.yml b/.github/artifact_redirect.yml deleted file mode 100644 index 9f23ede..0000000 --- a/.github/artifact_redirect.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: CircleCI Preview - -on: [status] - -jobs: - circleci_artifacts_redirector_job: - runs-on: ubuntu-latest - if: "${{ github.event.context == 'ci/circleci: build_book' }}" - name: Run CircleCI artifacts redirector - steps: - - name: GitHub Action step - id: step1 - uses: larsoner/circleci-artifacts-redirector-action@master - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - artifact-path: 0/html/index.html - circleci-jobs: build_book - job-title: Click to preview rendered book on CircleCI diff --git a/.github/workflows/artifact_redirect.yml b/.github/workflows/artifact_redirect.yml new file mode 100644 index 0000000..230cd40 --- /dev/null +++ b/.github/workflows/artifact_redirect.yml @@ -0,0 +1,25 @@ +name: Book Preview Redirect +on: [status] + +concurrency: + group: docs-preview-${{ github.ref }} + cancel-in-progress: true + +jobs: + circleci_artifacts_redirector_job: + runs-on: ubuntu-latest + # For testing this action on a fork, remove the "github.repository =="" condition. + if: "github.event.context == 'ci/circleci: build-book'" + permissions: + statuses: write + name: Run CircleCI artifacts redirector + steps: + - name: GitHub Action step + id: step1 + uses: larsoner/circleci-artifacts-redirector-action@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + api-token: ${{ secrets.CIRCLECI_TOKEN }} + artifact-path: 0/html/index.html + circleci-jobs: build-book + job-title: View rendered book here!