Skip to content

Commit

Permalink
Fix: book redirect build needs secret (pyOpenSci#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwasser authored Jan 8, 2024
1 parent db835f9 commit 3497091
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/artifact_redirect.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
name: Book Preview

name: CircleCI artifacts redirector
on: [status]

# Restrict the permissions granted to the use of secrets.GITHUB_TOKEN in this
# github actions workflow:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
statuses: write

jobs:
circleci_artifacts_redirector_job:
runs-on: ubuntu-latest
if: "${{ github.event.context == 'ci/circleci: build_book' }}"
# For testing this action on a fork, remove the "github.repository =="" condition.
if: "github.repository == 'pyOpenSci/python-package-guide' && github.event.context == 'ci/circleci: build'"
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 }}
artifact-path: 0/html/index.html
circleci-jobs: build_book
job-title: Click to preview rendered book
api-token: ${{ secrets.CIRCLECI_TOKEN }}
artifact-path: 0/_site/index.html
circleci-jobs: build
job-title: Check the rendered website build here!

0 comments on commit 3497091

Please sign in to comment.