-
Notifications
You must be signed in to change notification settings - Fork 23
Add automated documentation build workflow for 26.1 LTS #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b13e44f
0dec59c
d0f3620
a7d0c0a
4aad090
0206433
1e1a886
88e9ed9
ee5951f
276ead1
fe0d4aa
3bbb03a
f86e841
daeda62
9b35947
21b9618
5ce8811
37bf5af
185d6e3
a1c8628
bbd6d4e
58640fe
b8dba1a
50e335b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,13 +59,11 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| # This makes it easier to test the custom 404 page by loading `/404.html` | ||||||||||||||||||||||||||||||||||||||||||||||||
| # on a local web server. | ||||||||||||||||||||||||||||||||||||||||||||||||
| if not on_rtd: | ||||||||||||||||||||||||||||||||||||||||||||||||
| notfound_urls_prefix = '' | ||||||||||||||||||||||||||||||||||||||||||||||||
| notfound_urls_prefix = "" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Specify the site name for the Open Graph extension. | ||||||||||||||||||||||||||||||||||||||||||||||||
| ogp_site_name = "Godot Engine documentation" | ||||||||||||||||||||||||||||||||||||||||||||||||
| ogp_social_cards = { | ||||||||||||||||||||||||||||||||||||||||||||||||
| "enable": False | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| ogp_social_cards = {"enable": False} | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| if not os.getenv("SPHINX_NO_GDSCRIPT"): | ||||||||||||||||||||||||||||||||||||||||||||||||
| extensions.append("gdscript") | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -84,9 +82,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # General information about the project | ||||||||||||||||||||||||||||||||||||||||||||||||
| project = "Godot Engine" | ||||||||||||||||||||||||||||||||||||||||||||||||
| copyright = ( | ||||||||||||||||||||||||||||||||||||||||||||||||
| "2024-present by the Redot community, modified from an original work by Juan Linietsky, Ariel Manzur and the G-dot community (CC BY 3.0)" | ||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||
| copyright = "2024-present by the Redot community, modified from an original work by Juan Linietsky, Ariel Manzur and the G-dot community (CC BY 3.0)" | ||||||||||||||||||||||||||||||||||||||||||||||||
| author = "the Redot community, modified from an original work by Juan Linietsky, Ariel Manzur and the G-dot community" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Version info for the project, acts as replacement for |version| and |release| | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -177,7 +173,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| "flyout_display": "attached", | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| html_title = supported_languages[language] % ( "(" + version + ")" ) | ||||||||||||||||||||||||||||||||||||||||||||||||
| html_title = supported_languages[language] % ("(" + version + ")") | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Edit on GitHub options: https://docs.readthedocs.io/en/latest/guides/edit-source-links-sphinx.html | ||||||||||||||||||||||||||||||||||||||||||||||||
| html_context = { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -187,19 +183,25 @@ | |||||||||||||||||||||||||||||||||||||||||||||||
| "github_version": "master", # Version | ||||||||||||||||||||||||||||||||||||||||||||||||
| "conf_py_path": "/", # Path in the checkout to the docs root | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_docs_title": supported_languages[language], | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_docs_basepath": "https://docs.godotengine.org/", | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_docs_basepath": "https://docs.redotengine.org/", | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_docs_suffix": ".html", | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Distinguish local development website from production website. | ||||||||||||||||||||||||||||||||||||||||||||||||
| # This prevents people from looking for changes on the production website after making local changes :) | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_title_prefix": "" if on_rtd else "(DEV) ", | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Set this to `True` when in the `latest` branch to clearly indicate to the reader | ||||||||||||||||||||||||||||||||||||||||||||||||
| # that they are not reading the `stable` documentation. | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_is_latest": True, | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_version": "4.4", | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_version": "dev", | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Enables a banner that displays the up-to-date status of each article. | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_show_article_status": True, | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Display user-contributed notes at the bottom of pages that don't have `:allow_comments: False` at the top. | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_show_article_comments": on_rtd and not is_i18n, | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Available documentation versions for the version selector | ||||||||||||||||||||||||||||||||||||||||||||||||
| "godot_versions": [ | ||||||||||||||||||||||||||||||||||||||||||||||||
| ("4.3", "/4.3/"), | ||||||||||||||||||||||||||||||||||||||||||||||||
| ("4.4", "/4.4/"), | ||||||||||||||||||||||||||||||||||||||||||||||||
| ("dev", "/dev/"), | ||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+194
to
+204
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Version configuration appears inconsistent with 26.1 LTS purpose. This conf.py is meant for the 26.1 LTS build, but:
If this conf.py will be used for 26.1 LTS documentation, update the values accordingly: 🔧 Suggested fix for 26.1 LTS configuration- "godot_version": "dev",
+ "godot_version": "26.1",
# Enables a banner that displays the up-to-date status of each article.
"godot_show_article_status": True,
# Display user-contributed notes at the bottom of pages that don't have `:allow_comments: False` at the top.
"godot_show_article_comments": on_rtd and not is_i18n,
# Available documentation versions for the version selector
"godot_versions": [
("4.3", "/4.3/"),
("4.4", "/4.4/"),
+ ("26.1", "/26.1/"),
("dev", "/dev/"),
],📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| html_logo = "img/docs_logo.svg" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -289,6 +291,7 @@ def godot_get_image_filename_for_language(filename, env): | |||||||||||||||||||||||||||||||||||||||||||||||
| path = os.path.abspath(os.path.join("../images/", os.path.relpath(path, cwd))) | ||||||||||||||||||||||||||||||||||||||||||||||||
| return path | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| sphinx.util.i18n.get_image_filename_for_language = godot_get_image_filename_for_language | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Similar story for the localized class reference, it's out of tree and there doesn't | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -305,4 +308,4 @@ def godot_get_image_filename_for_language(filename, env): | |||||||||||||||||||||||||||||||||||||||||||||||
| os.symlink("../classes/" + language, "classes") | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Needed so the table of contents is created for EPUB | ||||||||||||||||||||||||||||||||||||||||||||||||
| epub_tocscope = 'includehidden' | ||||||||||||||||||||||||||||||||||||||||||||||||
| epub_tocscope = "includehidden" | ||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic flaw: detached HEAD state defeats the
--exclude-classesflag.When the workflow runs
git checkout upstream/master, Git enters detached HEAD state wheregit rev-parse --abbrev-ref HEADreturns"HEAD". Since the condition requiresgitBranch != "HEAD", the--exclude-classesflag will never be used in the CI workflow even whenBUILD_DIRis set.If the intent is to use
--exclude-classeswheneverBUILD_DIRis set (regardless of HEAD state), simplify the condition:🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents