forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Circle CI job to show a preview of the docs on PRs
Fixes sympy#23460.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
|
||
# Aliases to reuse | ||
_defaults: &defaults | ||
docker: | ||
# CircleCI maintains a library of pre-built images | ||
# documented at https://circleci.com/docs/2.0/circleci-images/ | ||
- image: cimg/python:3.10.2 | ||
working_directory: ~/repo | ||
|
||
jobs: | ||
build_page: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/ | ||
- run: | ||
name: build docs | ||
no_output_timeout: 25m | ||
command: | | ||
cd doc | ||
pip install -r requirements.txt | ||
make html | ||
- store_artifacts: | ||
path: _build/html | ||
|
||
workflows: | ||
version: 2 | ||
default: | ||
jobs: | ||
- build_page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
on: [status] | ||
jobs: | ||
circleci_artifacts_redirector_job: | ||
# Don't run Action on forks, and allow skipping CI | ||
if: "github.repository == 'sympy/sympy'" | ||
runs-on: ubuntu-latest | ||
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/_build/html/index.html | ||
circleci-jobs: build_page | ||
job-title: Click here to see a preview of the documentation. | ||
- name: Array API preview | ||
run: | | ||
curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA |