Skip to content

Fix: book redirect build needs secret #156

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

Merged
merged 1 commit into from
Jan 8, 2024
Merged
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
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!