Update docs.yml #3
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: Build and Deploy Documentation | |
on: | |
push: | |
branches: | |
- master # Replace with your default branch if it's not 'master' | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' # Specify the Python version | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install sphinx sphinx_rtd_theme | |
# Install any other dependencies here | |
- name: Install Package | |
run: | | |
pip install . | |
- name: Build Documentation | |
run: | | |
cd docs | |
make html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html |