Skip to content

Merge pull request #56 from kartverket/sphinx_deployment #1

Merge pull request #56 from kartverket/sphinx_deployment

Merge pull request #56 from kartverket/sphinx_deployment #1

name: Build and Deploy Sphinx Documentation
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Dependencies
run: |
pip install sphinx
- name: Generate .rst files
run: |
sphinx-apidoc -o generated_docs/ .
- name: Update index.rst
run: |
update_index_rst.py
- name: Build Sphinx Documentation
run: |
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
branch: gh-pages