Skip to content

Commit 3497091

Browse files
authored
Fix: book redirect build needs secret (#156)
1 parent db835f9 commit 3497091

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed
+15-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
name: Book Preview
2-
1+
name: CircleCI artifacts redirector
32
on: [status]
43

4+
# Restrict the permissions granted to the use of secrets.GITHUB_TOKEN in this
5+
# github actions workflow:
6+
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
7+
permissions:
8+
statuses: write
9+
510
jobs:
611
circleci_artifacts_redirector_job:
712
runs-on: ubuntu-latest
8-
if: "${{ github.event.context == 'ci/circleci: build_book' }}"
13+
# For testing this action on a fork, remove the "github.repository =="" condition.
14+
if: "github.repository == 'pyOpenSci/python-package-guide' && github.event.context == 'ci/circleci: build'"
15+
permissions:
16+
statuses: write
917
name: Run CircleCI artifacts redirector
1018
steps:
1119
- name: GitHub Action step
1220
id: step1
1321
uses: larsoner/circleci-artifacts-redirector-action@master
1422
with:
1523
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
artifact-path: 0/html/index.html
17-
circleci-jobs: build_book
18-
job-title: Click to preview rendered book
24+
api-token: ${{ secrets.CIRCLECI_TOKEN }}
25+
artifact-path: 0/_site/index.html
26+
circleci-jobs: build
27+
job-title: Check the rendered website build here!

0 commit comments

Comments
 (0)