Skip to content

Merge pull request #168 from kartverket/base_file_manager_addition #94

Merge pull request #168 from kartverket/base_file_manager_addition

Merge pull request #168 from kartverket/base_file_manager_addition #94

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
pip install numpy
pip install sphinx_rtd_theme
- name: Prepare Config File
run: |
cp setup_guide/template_config.py config.py
- name: Generate .rst files
run: |
sphinx-apidoc -o generated_docs/ .
- name: Build Sphinx Documentation
run: |
make html
- name: Copy Custom CSS
run: |
cp .github/custom_styles/custom.css _build/html/_static/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
branch: gh-pages