Skip to content

Commit 0345c9c

Browse files
authored
Merge pull request #22 from jukent/template
make workflows match template
2 parents 703110d + 52c618f commit 0345c9c

11 files changed

+72
-226
lines changed

.github/workflows/delete-preview.yaml

-26
This file was deleted.

.github/workflows/deploy-book.yaml

-43
This file was deleted.

.github/workflows/deploy-preview.yaml

-137
This file was deleted.

.github/workflows/nightly-build.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ on:
77

88
jobs:
99
build:
10+
if: ${{ github.repository_owner == 'ProjectPythiaCookbooks' }}
1011
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
1112
with:
12-
environment_name: cookbook-dev
13-
environment_file: environment.yml
14-
path_to_notebooks: ./
13+
environment_name: intake-cookbook-dev
1514

1615
link-check:
16+
if: ${{ github.repository_owner == 'ProjectPythiaCookbooks' }}
1717
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/link-checker.yaml@main
18-
with:
19-
environment_name: cookbook-dev
20-
environment_file: environment.yml
21-
path_to_notebooks: ./
18+

.github/workflows/publish-book.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: publish-book
2+
3+
on:
4+
# Trigger the workflow on push to main branch
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
13+
with:
14+
environment_name: intake-cookbook-dev
15+
16+
deploy:
17+
needs: build
18+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/deploy-book.yaml@main
19+

.github/workflows/trigger-book-build.yaml

+3-11
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ jobs:
66
build:
77
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
88
with:
9-
environment_name: cookbook-dev
10-
environment_file: environment.yml
11-
path_to_notebooks: ./
12-
use_cached_environment: 'true' # This is default, not strickly needed. Set to 'false' to always build a new environment
13-
link-check:
14-
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/link-checker.yaml@main
15-
with:
16-
environment_name: cookbook-dev
17-
environment_file: environment.yml
18-
path_to_notebooks: ./
19-
use_cached_environment: 'true'
9+
environment_name: intake-cookbook-dev
10+
artifact_name: book-zip-${{ github.event.number }}
11+
# Other input options are possible, see ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: trigger-delete-preview
2+
3+
on:
4+
pull_request_target:
5+
types: closed
6+
7+
jobs:
8+
delete:
9+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/delete-preview.yaml@main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: trigger-link-check
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
link-check:
7+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/link-checker.yaml@main
8+
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: trigger-preview
2+
on:
3+
workflow_run:
4+
workflows:
5+
- trigger-book-build
6+
types:
7+
- requested
8+
- completed
9+
10+
jobs:
11+
find-pull-request:
12+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/find-pull-request.yaml@main
13+
deploy-preview:
14+
needs: find-pull-request
15+
if: github.event.workflow_run.conclusion == 'success'
16+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/deploy-book.yaml@main
17+
with:
18+
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
19+
destination_dir: _preview/${{ needs.find-pull-request.outputs.number }} # deploy to subdirectory labeled with PR number
20+
is_preview: 'true'
21+
22+
preview-comment:
23+
needs: find-pull-request
24+
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/preview-comment.yaml@main
25+
with:
26+
pull_request_number: ${{ needs.find-pull-request.outputs.number }}
27+
sha: ${{ needs.find-pull-request.outputs.sha }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Intake Cookbook
44

55
[![nightly-build](https://github.com/ProjectPythiaCookbooks/intake-cookbook/actions/workflows/nightly-build.yaml/badge.svg)](https://github.com/ProjectPythiaCookbooks/intake-cookbook/actions/workflows/nightly-build.yaml)
6-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ProjectPythiaCookbooks/intake-cookbook/main?labpath=notebooks)
6+
[![Binder](http://binder.mypythia.org/badge_logo.svg)](http://binder.mypythia.org/v2/gh/ProjectPythiaCookbooks/intake-cookbook/main?labpath=notebooks)
77

88
This Project Pythia Cookbook covers using and creating Intake catalogs to access data.
99

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ sphinx:
5757
icon: fab fa-youtube-square
5858
type: fontawesome
5959
launch_buttons:
60-
binderhub_url: https://mybinder.org
60+
binderhub_url: http://binder.mypythia.org
6161
notebook_interface: jupyterlab
6262
extra_navbar: |
6363
Theme by <a href="https://projectpythia.org">Project Pythia</a>.<br><br>

0 commit comments

Comments
 (0)