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

FIX: adapt CI to "old" workflow with new myst build #61

Merged
merged 2 commits into from
Aug 12, 2024
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
15 changes: 8 additions & 7 deletions .github/workflows/build-book-pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ jobs:
run: |
# check if binder-folder has changed
# if changed, then a docker rebuild is needed
echo "REBUILD=$(git diff --quiet ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- binder || echo changed)" >> $GITHUB_ENV
echo "REBUILD=$(git diff --quiet ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- binder && echo unchanged || echo changed)" >> $GITHUB_ENV
- name: remove Dockerfile
run: |
if [[ ${{ env.REBUILD }} == "changed" ]]; then
echo "binder-folder HAS changed - NEEDS rebuild"
rm binder/Dockerfile
else
echo "binder-folder NOT changed - NO rebuild"
fi
# if [[ ${{ env.REBUILD }} == "changed" ]]; then
# echo "binder-folder HAS changed - NEEDS rebuild"
# rm binder/Dockerfile
# else
# echo "binder-folder NOT changed - NO rebuild"
# fi
rm binder/Dockerfile
- name: update jupyter dependencies with repo2docker
uses: jupyterhub/repo2docker-action@master
with:
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/build-book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ on:
required: false
default: 'true'
type: string # had a lot of trouble with boolean types, see https://github.com/actions/runner/issues/1483
permissions:
contents: read
pages: write
id-token: write

jobs:
build-container:
Expand All @@ -40,7 +36,7 @@ jobs:
run: |
# check if binder-folder has changed
# if changed, then a docker rebuild is needed
echo "REBUILD=$(git diff --quiet ${{ github.event.pull_request.before }}..${{ github.event.after }} -- binder || echo changed)" >> $GITHUB_ENV
echo "REBUILD=$(git diff --quiet ${{ github.event.pull_request.before }}..${{ github.event.after }} -- binder && echo unchanged || echo changed)" >> $GITHUB_ENV
- name: remove Dockerfile
run: |
# if [[ ${{ env.REBUILD }} == "changed" ]]; then
Expand Down Expand Up @@ -76,11 +72,6 @@ jobs:
- uses: actions/checkout@v4
- name: Build the book
run: |
# copy baltrad notebooks to book dir
# re add when baltrad issues are sorted out
# cp -rp /home/jovyan/notebooks/baltrad* notebooks/.
# cp -rp /home/jovyan/notebooks/pyart2baltrad* notebooks/.
# install/nbstripout_notebooks.sh
# run notebooks
pytest -n auto --verbose --durations=15 --pyargs notebooks
# build the book and copy to outside /work-folder
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-book.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: deploy-book

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

jobs:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/deploy-myst.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# This file was created automatically with `myst init --gh-pages` 🪄 💚

name: MyST GitHub Pages Deploy
on:
push:
# Runs on pushes targeting the default branch
branches: [main]
env:
# `BASE_URL` determines the website is served from, including CSS & JS assets
# You may need to change this to `BASE_URL: ''`
Expand Down