Skip to content

chdir to nbs

chdir to nbs #20

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [master, test_preview]
workflow_dispatch:
env:
PYTHON_VERSION: 3.8
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
cache-dependency-path: settings.ini
- name: Install Dependencies
env:
USE_PRE: ''
TORCH_CPU: true
shell: bash
run: |
set -ux
python -m pip install --upgrade pip
if [ $USE_PRE ]; then
pip install -Uq git+https://github.com/fastai/ghapi.git
pip install -Uq git+https://github.com/fastai/fastcore.git
pip install -Uq git+https://github.com/fastai/execnb.git
pip install -Uq git+https://github.com/fastai/nbdev.git
wget -q $(curl https://latest.fast.ai/pre/quarto-dev/quarto-cli/linux-amd64.deb)
sudo dpkg -i quarto*.deb
else
pip install -Uq nbdev
fi
if [ $TORCH_CPU ]; then
test -f setup.py && pip install -e ".[dev]" --extra-index-url https://download.pytorch.org/whl/cpu
else
test -f setup.py && pip install -e ".[dev]"
fi
python pre_nbdev_preview.py
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
force_orphan: true
publish_dir: ./_docs
# The following lines assign commit authorship to the official GH-Actions bot for deploys to `gh-pages` branch.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com