Skip to content

Commit

Permalink
Merge pull request #41 from jukent/rename
Browse files Browse the repository at this point in the history
attempt to fix link checker
  • Loading branch information
jukent authored Dec 8, 2023
2 parents a781951 + 0e97258 commit c3c920c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/link-chcker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
jobs:
link-checker:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4

- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true

- name: Install Jupyterbook
run: mamba install -c conda-forge jupyter-book

- name: Check for config file
id: check_config
uses: andstor/file-existence-action@v2
with:
files: "${{ inputs.path_to_notebooks }}/_config.yml"

- name: Disable notebook execution
if: steps.check_config.outputs.files_exists == 'true'
shell: python
run: |
import yaml
with open('${{ inputs.path_to_notebooks }}/_config.yml') as f:
data = yaml.safe_load(f)
data['execute']['execute_notebooks'] = 'off'
with open('${{ inputs.path_to_notebooks }}/_config.yml', 'w') as f:
yaml.dump(data, f)
- name: Check external links
run: |
cd ${{ inputs.path_to_notebooks }}
linkchecker --ignore-url "https://www.noaa.gov/jetstream" --ignore-url "https://weather.uwyo.edu/upperair/" --ignore-ssl-check ${{ inputs.build_command }}
2 changes: 1 addition & 1 deletion .github/workflows/trigger-link-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:

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

0 comments on commit c3c920c

Please sign in to comment.