Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update workflows to match template #5

Merged
merged 3 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
26 changes: 0 additions & 26 deletions .github/workflows/delete-preview.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/deploy-book.yaml

This file was deleted.

137 changes: 0 additions & 137 deletions .github/workflows/deploy-preview.yaml

This file was deleted.

7 changes: 1 addition & 6 deletions .github/workflows/nightly-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@ jobs:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_name: cookbook-dev
environment_file: environment.yml
path_to_notebooks: ./

link-check:
if: ${{ github.repository_owner == 'ProjectPythiaCookbooks' }}
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/link-checker.yaml@main
with:
environment_name: cookbook-dev
environment_file: environment.yml
path_to_notebooks: ./

19 changes: 19 additions & 0 deletions .github/workflows/publish-book.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: publish-book

on:
# Trigger the workflow on push to main branch
push:
branches:
- main
workflow_dispatch:

jobs:
build:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_name: cookbook-dev

deploy:
needs: build
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/deploy-book.yaml@main

12 changes: 2 additions & 10 deletions .github/workflows/trigger-book-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,5 @@ jobs:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_name: cookbook-dev
environment_file: environment.yml
path_to_notebooks: ./
use_cached_environment: 'true' # This is default, not strickly needed. Set to 'false' to always build a new environment
link-check:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/link-checker.yaml@main
with:
environment_name: cookbook-dev
environment_file: environment.yml
path_to_notebooks: ./
use_cached_environment: 'true'
artifact_name: book-zip-${{ github.event.number }}
# Other input options are possible, see ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml
9 changes: 9 additions & 0 deletions .github/workflows/trigger-delete-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: trigger-delete-preview

on:
pull_request_target:
types: closed

jobs:
delete:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/delete-preview.yaml@main
8 changes: 8 additions & 0 deletions .github/workflows/trigger-link-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: trigger-link-check
on:
pull_request:

jobs:
link-check:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/link-checker.yaml@main

27 changes: 27 additions & 0 deletions .github/workflows/trigger-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: trigger-preview
on:
workflow_run:
workflows:
- trigger-book-build
types:
- requested
- completed

jobs:
find-pull-request:
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/find-pull-request.yaml@main
deploy-preview:
needs: find-pull-request
if: github.event.workflow_run.conclusion == 'success'
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/deploy-book.yaml@main
with:
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
destination_dir: _preview/${{ needs.find-pull-request.outputs.number }} # deploy to subdirectory labeled with PR number
is_preview: 'true'

preview-comment:
needs: find-pull-request
uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/preview-comment.yaml@main
with:
pull_request_number: ${{ needs.find-pull-request.outputs.number }}
sha: ${{ needs.find-pull-request.outputs.sha }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# (re)Gridding with xarray Cookbook

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

This small cookbook will introduce three python packages that grids and re-grids data, that can interface with the xarray ecosystem. This is a common workflow, as modeling (climate, ML, etc.) outputs might not be all on the same scale or same grid.

Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ sphinx:
icon: fab fa-youtube-square
type: fontawesome
launch_buttons:
binderhub_url: https://mybinder.org
binderhub_url: http://binder.mypythia.org
notebook_interface: jupyterlab
extra_navbar: |
Theme by <a href="https://projectpythia.org">Project Pythia</a>.<br><br>
Expand Down