diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b741362d..3aef2878 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -7,6 +7,8 @@ on: # Runs on pushes targeting the default branch push: branches: ["main"] + pull_request: + branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -25,9 +27,7 @@ concurrency: jobs: build: - runs-on: ubuntu-latest - steps: - name: Checkout uses: actions/checkout@v4 @@ -51,11 +51,12 @@ jobs: # Deployment job deploy: + runs-on: ubuntu-latest + needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/main' # Only run on pushes to main environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build steps: - name: Deploy to GitHub Pages id: deployment diff --git a/docs/source/conf.py b/docs/source/conf.py index d228736f..9c78a74d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,11 +13,11 @@ import sys import importlib.util from pathlib import Path +from importlib.metadata import version as importlib_version from importlib.metadata import metadata import sphinx_rtd_theme # noqa: F401 -import firewheel from firewheel.control.repository_db import RepositoryDb from firewheel.control.model_component_manager import ModelComponentManager from firewheel.control.model_component_iterator import ModelComponentIterator @@ -33,10 +33,10 @@ author = "Sandia National Laboratories" # The short X.Y version -version = firewheel.__version__ +version = importlib_version("firewheel") # The full version, including alpha/beta/rc tags -release = firewheel.__version__ +release = importlib_version("firewheel") # -- General configuration --------------------------------------------------- diff --git a/tox.ini b/tox.ini index af2c7b03..3d85bfc8 100644 --- a/tox.ini +++ b/tox.ini @@ -117,10 +117,20 @@ commands = basepython = python3 changedir={toxinidir}/docs extras = docs +deps = + firewheel-repo-base + firewheel-repo-linux + firewheel-repo-vyos + firewheel-repo-tutorials + firewheel-repo-layer2 + firewheel-repo-ntp + firewheel-repo-dns allowlist_externals= /usr/bin/make + /bin/mkdir commands = - make html + /bin/mkdir -p source/model_components + /usr/bin/make html all: make singlehtml all: sphinx-build -M man source/cli build -c source all: make latexpdf