Merge pull request #191 from kartverket/more_road_updates #116
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 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 |