Skip to content

FIX Several small fixes #1334

FIX Several small fixes

FIX Several small fixes #1334

Workflow file for this run

name: deploy-gh-pages
on:
push:
branches:
- main
- test-ci*
pull_request:
branches:
- main
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
env:
OMP_NUM_THREADS: 1
MKL_NUM_THREADS: 2
OPENBLAS_NUM_THREADS: 2
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
- name: Cache jupyter-cache folder
uses: actions/cache@v3
env:
cache-name: jupyter-cache
with:
path: jupyter-book/_build/.jupyter_cache
key: v2-${{ github.ref }}-${{ hashFiles('python_scripts/**/*.py') }}
restore-keys: |
v2-${{ github.ref }}-${{ hashFiles('python_scripts/**/*.py') }}
v2-${{ github.ref }}
v2-refs/heads/main
- name: Build the JupyterBook
env:
GITHUB_PULL_REQUEST_NUMBER: ${{github.event.number}}
run: |
bash build_tools/build_jupyter_book.sh
- name: Save the PR number
env:
GITHUB_PULL_REQUEST_NUMBER: ${{github.event.number}}
run: |
echo "Storing PR number ${{github.event.number}} to 'pull_request_number' file"
echo ${{github.event.number}} > pull_request_number
- name: Upload jupyter-book artifact for preview in PRs
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: jupyter-book
path: |
jupyter-book/_build/html
pull_request_number
- name: Update the main gh-page website
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./jupyter-book/_build/html
commit_message: "[ci skip] ${{ github.event.head_commit.message }}"