skip incompatible macos versions of python #229
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Docs | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.9' | |
architecture: x64 | |
- name: Install Dependencies | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
python -m pip install -e . | |
python -m pip install sphinx sphinx-rtd-theme m2r mistune==0.8.4 docutils==0.17 | |
- uses: actions/checkout@v3 | |
with: | |
ref: docs | |
- name: Update Docs to Master | |
run: | | |
git fetch --all | |
git reset --hard origin/master | |
- name: Generate Documentation | |
run: | | |
mv docs/index.rst . | |
rm docs/*.rst || true | |
mv index.rst docs/ | |
rm README.rst || true | |
rm docs/README.rst || true | |
rm implemented_metrics.rst || true | |
rm docs/implemented_metrics.rst || true | |
m2r README.md | |
m2r implemented_metrics.md | |
mv README.rst docs | |
mv implemented_metrics.rst docs | |
cd docs | |
rm *.html *.doctree || true | |
sphinx-apidoc -f -o . .. | |
make clean | |
make html | |
cp -r _build/html/* . | |
cp -r _build/doctrees/* . | |
echo "" > .nojekyll | |
- name: Push to Docs Branch | |
run: | | |
git add . | |
git commit -m "Automated Docs Update" -a || true | |
git push -f |