Skip to content

Commit 4cdc9e8

Browse files
Add circleci redirector (#285)
* Add circleci redirector * Remove pr-preview action * Tell circleci to checkout the repo * Use a node image
1 parent 089070b commit 4cdc9e8

3 files changed

Lines changed: 29 additions & 18 deletions

File tree

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ version: 2.1
22
jobs:
33
build:
44
docker:
5-
- image: cimg/python:3.14
5+
- image: cimg/node:25.9.0
66
steps:
7+
- checkout
78
- run:
8-
name: Build website
9+
name: build_website
910
command: make html
1011
- store_artifacts:
1112
path: _build/html/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on: [status]
2+
3+
permissions: read-all
4+
5+
jobs:
6+
circleci_artifacts_redirector_job:
7+
runs-on: ubuntu-latest
8+
if: "${{ github.event.context == 'ci/circleci: build_website' }}"
9+
permissions:
10+
statuses: write
11+
name: Run CircleCI artifacts redirector
12+
steps:
13+
- name: GitHub Action step
14+
id: step1
15+
uses: scientific-python/circleci-artifacts-redirector-action@5d358ff96e96429a5c64a969bb4a574555439f4f # v1.3.1
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
api-token: ${{ secrets.CIRCLECI_ARTIFACT_REDIRECTOR_TOKEN }}
19+
artifact-path: 0/_build/html
20+
circleci-jobs: build_website
21+
job-title: Check the rendered docs here!
22+
- name: Check the URL
23+
if: github.event.status != 'pending'
24+
run: |
25+
curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA

.github/workflows/pr.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Build Check & Preview
1+
name: PR Build Check
22

33
on:
44
pull_request:
@@ -25,18 +25,3 @@ jobs:
2525
cache: npm
2626

2727
- run: make check
28-
29-
# continue-on-error because fork PRs don't have write access to push
30-
# the preview to gh-pages. The build check above still validates the PR.
31-
- uses: rossjrw/pr-preview-action@v1
32-
continue-on-error: true
33-
with:
34-
source-dir: _build/html
35-
36-
cleanup:
37-
if: github.event.action == 'closed'
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v4
41-
42-
- uses: rossjrw/pr-preview-action@v1

0 commit comments

Comments
 (0)