This repository was archived by the owner on Mar 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 130130github_repo = project
131131github_user = "DiamondLightSource"
132132switcher_json = f"https://{ github_user } .github.io/{ github_repo } /switcher.json"
133- # Don't check switcher if it doesn't exist, but warn in a non-failing way
134- check_switcher = requests .get (switcher_json ).ok
135- if not check_switcher :
133+ switcher_exists = requests .get (switcher_json ).ok
134+ if not switcher_exists :
136135 print (
137136 "*** Can't read version switcher, is GitHub pages enabled? \n "
138137 " Once Docs CI job has successfully run once, set the "
142141 )
143142
144143# Theme options for pydata_sphinx_theme
144+ # We don't check switcher because there are 3 possible states for a repo:
145+ # 1. New project, docs are not published so there is no switcher
146+ # 2. Existing project with latest skeleton, switcher exists and works
147+ # 3. Existing project with old skeleton that makes broken switcher,
148+ # switcher exists but is broken
149+ # Point 3 makes checking switcher difficult, because the updated skeleton
150+ # will fix the switcher at the end of the docs workflow, but never gets a chance
151+ # to complete as the docs build warns and fails.
145152html_theme_options = dict (
146153 logo = dict (
147154 text = project ,
159166 json_url = switcher_json ,
160167 version_match = version ,
161168 ),
162- check_switcher = check_switcher ,
169+ check_switcher = False ,
163170 navbar_end = ["theme-switcher" , "icon-links" , "version-switcher" ],
164171 external_links = [
165172 dict (
You can’t perform that action at this time.
0 commit comments