Skip to content

Commit

Permalink
ci: add overpass cache to mkdocs generation (#133)
Browse files Browse the repository at this point in the history
* ci: try to add overpass cache to ci

* ci: added overpass cache to both environments
  • Loading branch information
RaczeQ authored Dec 7, 2022
1 parent 9b9df54 commit fa6df94
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
needs: [run-tests]
runs-on: ubuntu-latest
env:
MKDOCS_EXECUTE_JUPYTER: true
MKDOCS_EXECUTE_JUPYTER: false # execution is done before rendering documentation
steps:
- uses: actions/checkout@v2
- name: Fetch gh-pages branch
Expand All @@ -72,6 +72,8 @@ jobs:
run: pip install -r requirements.txt
- name: Install geovoronoi dependency
run: pip install geovoronoi==0.4.0
- name: Install nbconvert dependency
run: pip install jupyter nbconvert nbformat
- name: Install self
run: |
pdm build -v -d dist
Expand All @@ -80,6 +82,14 @@ jobs:
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Cache Overpass data
uses: actions/cache@v3
with:
path: "**/cache"
key: mkdocs-overpass-dev-cache-${{ runner.os }}
- name: Execute jupyter notebooks
run: |
jupyter nbconvert --to notebook --inplace --execute $(find examples/ -type f -name "*.ipynb") --ExecutePreprocessor.kernel_name='python3'
- uses: jannekem/run-python-script-action@v1
name: Replace copyright date
with:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/ci-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
needs: [run-tests]
runs-on: ubuntu-latest
env:
MKDOCS_EXECUTE_JUPYTER: true
MKDOCS_EXECUTE_JUPYTER: false # execution is done before rendering documentation
steps:
- uses: actions/checkout@v2
- name: Fetch gh-pages branch
Expand All @@ -58,6 +58,8 @@ jobs:
run: pip install -r requirements.txt
- name: Install geovoronoi dependency
run: pip install geovoronoi==0.4.0
- name: Install nbconvert dependency
run: pip install jupyter nbconvert nbformat
- name: Install self
run: |
pdm build -v -d dist
Expand All @@ -66,6 +68,14 @@ jobs:
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Cache Overpass data
uses: actions/cache@v3
with:
path: "**/cache"
key: mkdocs-overpass-dev-cache-${{ runner.os }}
- name: Execute jupyter notebooks
run: |
jupyter nbconvert --to notebook --inplace --execute $(find examples/ -type f -name "*.ipynb") --ExecutePreprocessor.kernel_name='python3'
- uses: jannekem/run-python-script-action@v1
name: Replace copyright date
with:
Expand Down

0 comments on commit fa6df94

Please sign in to comment.