Skip to content

Commit

Permalink
fix: move build.py and better
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Dec 7, 2023
1 parent b799bb5 commit d7072cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions download/build.py → .github/workflows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ def size(size_in_bytes):
p = FOLDER + name
if name.endswith(".gz"):
date = datetime.fromtimestamp(getmtime(p)).strftime("%Y-%m-%d %H:%M:%S")
s += t.substitute(file=p, date=date, size=size(getsize(p)))
s += t.substitute(file=name, date=date, size=size(getsize(p)))
with open(FOLDER + PATH_TO_FILE, "r", encoding="utf-8") as file:
file_data = file.read()
file_data = file_data.replace("<placeholder></placeholder>", s)

with open(FOLDER + PATH_TO_FILE, "w", encoding="utf-8") as file:
file.write(file_data)
os.remove(FOLDER + "build.py")
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v4
- name: render index.html
run: python3 download/build.py
run: python3 .github/workflows/build.py
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down

0 comments on commit d7072cd

Please sign in to comment.