diff options
author | 2022-02-21 12:59:54 +0000 | |
---|---|---|
committer | 2022-02-21 12:59:54 +0000 | |
commit | a82c9a87c7f14a98bbdfa069b20fc9372f67d167 (patch) | |
tree | 30a061a43fa1889d83fb1ab333a15b4355dfc2a4 /docs | |
parent | Update how we auto-generate docs (diff) | |
parent | Merge pull request #23 from python-discord/bump-deps (diff) |
Merge branch 'main' into port-utilities
Diffstat (limited to 'docs')
-rw-r--r-- | docs/README.md | 6 | ||||
-rw-r--r-- | docs/changelog.rst | 6 | ||||
-rw-r--r-- | docs/netlify_build.py | 32 |
3 files changed, 43 insertions, 1 deletions
diff --git a/docs/README.md b/docs/README.md index 06c5a739..fa719292 100644 --- a/docs/README.md +++ b/docs/README.md @@ -43,3 +43,9 @@ You can use [this site][releases] to get the PR number you'll use for your entry [next]: https://ichard26.github.io/next-pr-number/?owner=python-discord&name=bot-core [releases]: https://releases.readthedocs.io/en/latest/concepts.html + +## Static Builds +We deploy our docs to netlify to power static previews on PRs. +Check out [python-discord/site][STATIC_BUILD_DOCS] for more info on the system. + +[STATIC_BUILD_DOCS]: https://github.com/python-discord/site/tree/main/static-builds diff --git a/docs/changelog.rst b/docs/changelog.rst index 58b8e558..25d01756 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,8 +4,12 @@ Changelog ========= - +- :release:`1.2.1 <22nd February 2022>` - :support:`3` Added intersphinx to docs. +- :release:`1.2.0 <9th January 2022>` +- :feature:`12` Code block detection regex +- :release:`1.1.0 <2nd December 2021>` - :support:`2` Autogenerated docs. - :feature:`2` Regex utility. +- :release:`1.0.0 <17th November 2021>` - :support:`1` Core package, poetry, and linting CI. diff --git a/docs/netlify_build.py b/docs/netlify_build.py new file mode 100644 index 00000000..ca8f6d2e --- /dev/null +++ b/docs/netlify_build.py @@ -0,0 +1,32 @@ +# WARNING: This file must remain compatible with python 3.8 + +# This script performs all the actions required to build and deploy our project on netlify +# It depends on the following packages, which are set in the netlify UI: +# httpx == 0.19.0 + +import importlib +from pathlib import Path + +import httpx + +SCRIPT_SOURCE = "https://raw.githubusercontent.com/python-discord/site/main/static-builds/netlify_build.py" +OUTPUT = Path("docs/build.py") +OUTPUT.unlink(missing_ok=True) + +build_script = httpx.get(SCRIPT_SOURCE) +build_script.raise_for_status() +OUTPUT.write_text( + build_script.text.replace( + "Build & Publish Static Preview", + "Build Docs" + ).replace( + "static-build", + "docs" + ) +) + +script = importlib.import_module(OUTPUT.name.replace(".py", "").replace("/", ".")) + +if __name__ == "__main__": + print("Build started") + script.download_artifact(*script.get_build_artifact()) |