Simplify publish action (#15657)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-08-19 03:24:42 +08:00 committed by GitHub
parent 5624a4a95f
commit 277df6cb37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 51 deletions

View file

@ -214,7 +214,7 @@ def convert_plaintext_links_to_html(content):
def remove_macros():
# Delete the /macros directory and sitemap.xml.gz from the built site
"""Removes the /macros directory and related entries in sitemap.xml from the built site."""
shutil.rmtree(SITE / "macros", ignore_errors=True)
(SITE / "sitemap.xml.gz").unlink(missing_ok=True)