Skip to content

Commit 87bef32

Browse files
authored
Add preview in circle (#8)
1 parent eb3651b commit 87bef32

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.circleci/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
# Aliases to reuse
3+
_defaults: &defaults
4+
docker:
5+
# CircleCI maintains a library of pre-built images
6+
# documented at https://circleci.com/docs/2.0/circleci-images/
7+
- image: cibuilds/hugo:0.80
8+
working_directory: ~/repo
9+
jobs:
10+
build_page:
11+
<<: *defaults
12+
steps:
13+
- checkout
14+
- attach_workspace:
15+
at: ~/
16+
- run:
17+
name: build docs
18+
no_output_timeout: 25m
19+
command: |
20+
git submodule update --init --recursive
21+
HUGO_ENV="production" hugo --themesDir themes/ --layoutDir layouts/
22+
- store_artifacts:
23+
path: public
24+
workflows:
25+
version: 2
26+
default:
27+
jobs:
28+
- build_page

.github/workflows/preview.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: [status]
2+
jobs:
3+
circleci_artifacts_redirector_job:
4+
runs-on: ubuntu-latest
5+
name: Run CircleCI artifacts redirector
6+
steps:
7+
- name: GitHub Action step
8+
id: step1
9+
uses: larsoner/circleci-artifacts-redirector-action@master
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
artifact-path: 0/public/index.html
13+
circleci-jobs: build_page
14+
job-title: Check the rendered site!
15+
- name: Data API webpage preview
16+
run: |
17+
curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA

config.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ theme = "kube"
55
description = "The purpose of the Consortium is to develop API standards for common Python data structures for scientific, data science and machine learning users and applications - using a combination of design discussions, requirements engineering and data-driven approaches."
66
Paginate = 4
77
pygmentsUseClasses = true
8+
relativeURLs = true
89

910
[Params]
1011
RSSLink = "/index.xml"
@@ -22,7 +23,7 @@ pygmentsUseClasses = true
2223
name = "Blog"
2324
weight = -100
2425
url = "/blog/"
25-
26+
2627
[[menu.main]]
2728
name = "Array API"
2829
weight = -100

0 commit comments

Comments
 (0)