ribesstefano's picture
Updated pages Action to install necessary dependences
840a9f3
name: Deploy Documentation
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
pip install sphinx sphinx_rtd_theme
- name: Build the documentation
run: |
sphinx-apidoc -o ./docs/source/ protac_degradation_predictor
sphinx-build -E ./docs ./docs/_build/html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
force_orphan: true