Skip to content

Commit

Permalink
Add force option to notebook render action
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill888 committed Feb 10, 2024
1 parent 5b7befb commit 63fcb71
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Render Example Notebooks

on:
workflow_dispatch:
inputs:
force:
description: 'Force re-rendering of notebooks'
required: false
default: 'false'
type: boolean
push:
paths:
- "notebooks/*py"
Expand Down Expand Up @@ -81,21 +87,21 @@ jobs:
key: docs-notebooks-${{ hashFiles('notebooks/*.py') }}

- name: Get Conda Environment from Cache
if: steps.nb_cache.outputs.cache-hit != 'true'
if: steps.nb_cache.outputs.cache-hit != 'true' || github.event.inputs.force == 'true'
uses: actions/cache@v4
id: conda_cache
with:
path: /tmp/binder_env
key: ${{ runner.os }}-binder-env-${{ hashFiles('binder/environment.yml') }}

- name: Update PATH
if: steps.nb_cache.outputs.cache-hit != 'true'
if: steps.nb_cache.outputs.cache-hit != 'true' || github.event.inputs.force == 'true'
shell: bash
run: |
echo "/tmp/binder_env/bin" >> $GITHUB_PATH
- name: Run Notebooks
if: steps.nb_cache.outputs.cache-hit != 'true'
if: steps.nb_cache.outputs.cache-hit != 'true' || github.event.inputs.force == 'true'
run: |
nb_dir="${{ steps.cfg.outputs.nb-dir }}"
Expand Down

0 comments on commit 63fcb71

Please sign in to comment.