Optimize social preview images before publishing website

This commit is contained in:
Kovid Goyal 2023-04-15 21:49:32 +05:30
parent 39eff0fe8c
commit 77e2572c5a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -154,6 +154,7 @@ def run_website(args: Any) -> None:
f.write(version) f.write(version)
shutil.copy2(os.path.join(docs_dir, 'installer.sh'), publish_dir) shutil.copy2(os.path.join(docs_dir, 'installer.sh'), publish_dir)
os.chdir(os.path.dirname(publish_dir)) os.chdir(os.path.dirname(publish_dir))
subprocess.check_call(['optipng', '-o7', 'kitty/_images/social_previews/*.png'])
subprocess.check_call(['git', 'add', 'kitty']) subprocess.check_call(['git', 'add', 'kitty'])
subprocess.check_call(['git', 'commit', '-m', 'kitty website updates']) subprocess.check_call(['git', 'commit', '-m', 'kitty website updates'])
subprocess.check_call(['git', 'push']) subprocess.check_call(['git', 'push'])