Skip to content

Commit

Permalink
fix(build): ensure index.html is not duplicated (lol)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheManchineel committed Dec 12, 2024
1 parent c6f52e6 commit a0f65bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches: ["main"]
paths:
- "*/*.md"
- "*/*.jpg"
- "*/*.jpeg"
- "*/*.webp"
- "*/*.png"
- "*/*.gif"
- ".github/workflows/gh-pages.yml"

workflow_dispatch:
Expand Down
5 changes: 4 additions & 1 deletion build_docs_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()))


Expand Down

0 comments on commit a0f65bb

Please sign in to comment.