Skip to content

Bump actions/cache from 3 to 4 (#297) #167

Bump actions/cache from 3 to 4 (#297)

Bump actions/cache from 3 to 4 (#297) #167

Workflow file for this run

#
# Build and deploy the documentation
#
name: Deploy
# Run on main branch only
on:
# uncomment 'pull_request' line to test the workflow in PR
# pull_request:
push:
branches:
- main
schedule:
# Run weekly at 00:00 on Sunday
- cron: '0 0 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1.7.3
with:
environment-file: environment.yml
cache-downloads: true
cache-environment: true
- uses: actions/cache@v4
id: cache
with:
path: |
_build/jupyter_execute/
key: caches
- name: Disable notebook cache for scheduled jobs
if: github.event_name == 'schedule'
run: |
sed -i"" 's/execute_notebooks: auto/execute_notebooks: force/' source/_config.yml
- name: Build documentation
run: make dirhtml
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/dirhtml
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'