Skip to content

Commit

Permalink
FIX: adapt CI to "old" workflow with new myst build (#61)
Browse files Browse the repository at this point in the history
* FIX: adapt CI to "old" workflow with new myst build
* FIX: remove Dockerfile in any case for now
  • Loading branch information
kmuehlbauer authored Aug 12, 2024
1 parent 4202b0f commit 1748293
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
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

0 comments on commit 1748293

Please sign in to comment.