Skip to content

Commit

Permalink
Remove temp files after handling each update
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Sep 14, 2022
1 parent 722f9aa commit 9a56e95
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions data/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pathlib import Path
import subprocess
import requests
import shutil
import html
import json
import time
Expand Down Expand Up @@ -328,6 +329,12 @@ def commit_deploy(pr_title):
response.raise_for_status()


def clean_deploy_files():
# Remove files that take a lot of space and are no longer needed.
shutil.rmtree(config.out_path.joinpath('manifests'))
shutil.rmtree(config.out_path.joinpath('parsed'))


def main():
if not can_deploy():
print('can_deploy() returned False, exiting')
Expand All @@ -354,6 +361,8 @@ def main():
print('Done')
return

clean_deploy_files()


if __name__ == '__main__':
main()

0 comments on commit 9a56e95

Please sign in to comment.