diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 4bb8a64..a0f08ff 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -5,6 +5,11 @@ on: branches: ["main"] paths: - "*/*.md" + - "*/*.jpg" + - "*/*.jpeg" + - "*/*.webp" + - "*/*.png" + - "*/*.gif" - ".github/workflows/gh-pages.yml" workflow_dispatch: diff --git a/build_docs_v2.py b/build_docs_v2.py index 6086a56..a282216 100644 --- a/build_docs_v2.py +++ b/build_docs_v2.py @@ -34,8 +34,11 @@ def build_docs_and_index(): ] ).wait() - with open("/workspace/index.html", "r+") as index_file: + original_html = "" + with open("/workspace/index.html", "r") as index_file: original_html = index_file.read() + + with open("/workspace/index.html", "w") as index_file: index_file.write(original_html.replace("{{{PLACEHOLDER}}}", index_entries.getvalue()))