From a5d36ed98080ce675515141ed540acfe71604b1a Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Tue, 8 Feb 2022 11:09:50 +0000 Subject: [PATCH 1/2] Define READTHEDOCS to True on CI, to mock building on RTD --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9d1fb9..82d825d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,11 @@ on: jobs: # This workflow contains a single job called "build" build: + # Define environment variables in the job + env: + # When building on RTD, conf.py has some conditional logic. Test building with this enabled. + READTHEDOCS: "True" + # The type of runner that the job will run on runs-on: ubuntu-latest From e37a8b27ac5f46be0af8e03156a119646b0d2c3e Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Tue, 8 Feb 2022 11:22:29 +0000 Subject: [PATCH 2/2] Replace deprecated/removed sphinx method which was only used on RTD builds --- conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.py b/conf.py index 1278f63..dbffbec 100644 --- a/conf.py +++ b/conf.py @@ -189,8 +189,8 @@ def setup(app): on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: - app.add_javascript('https://use.fontawesome.com/c79ff27dd1.js') - app.add_javascript('js/rtd-versions.js') + app.add_js_file('https://use.fontawesome.com/c79ff27dd1.js') + app.add_js_file('js/rtd-versions.js') # Control use of the shphinx-rediraffe plugin to generate redirect files for moved documentation. # This is only viable for whole-pages, not for any bookmarks within a page unfortunately.