Skip to content

Merge pull request #25 from MarieRoald/fix-for-updated-dependencies #59

Merge pull request #25 from MarieRoald/fix-for-updated-dependencies

Merge pull request #25 from MarieRoald/fix-for-updated-dependencies #59

Workflow file for this run

name: docs
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install package
run: |
python -m pip install -e .
- name: Make doc
run: |
cd docs
make html
cd ..
- name: Push docs
run: |
# See https://github.community/t/github-actions-bot-email-address/17204/5
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions"
git fetch origin gh-pages
git checkout gh-pages
git rm -r dev/*
cp -r docs/_build/html/* dev
git add dev
# If the doc is up to date, the script shouldn't fail, hence --allow-empty
# Might be a cleaner way to check
git commit --allow-empty -m "Deployed to GitHub Pages"
git push --force origin gh-pages