Skip to content

Merge pull request #96 from flatironinstitute/mike-refactor-tests #9

Merge pull request #96 from flatironinstitute/mike-refactor-tests

Merge pull request #96 from flatironinstitute/mike-refactor-tests #9

Workflow file for this run

name: docs
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out github
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade -r docs/requirements.txt
python -m pip install .
- name: Build docs
env:
SPHINXOPTS: "-v"
run: |
cd docs/
make clean
make html
- name: Check out github
uses: actions/checkout@v4
with:
path: docs/_build/pyt-fnft-docs
ref: gh-pages
- name: Commit html docs
run: |
cd docs/_build/
ls
rm -rf pyt-fnft-docs/*
cp -r html/. pyt-fnft-docs/
cd pyt-fnft-docs/
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit --amend -m "Rebuild docs"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: docs/_build/pyt-fnft-docs
force: true