From 1a1bf88f0d3262f9ffae8af926f5a94a24c17b3e Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Thu, 4 Jul 2024 20:37:43 +0200 Subject: [PATCH] This isn't how any of this is deployed --- fabfile.py | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/fabfile.py b/fabfile.py index bab69d8..817f9c7 100644 --- a/fabfile.py +++ b/fabfile.py @@ -20,34 +20,4 @@ def dev(ctx, host="127.0.0.1", port=8000): ) -@fl.task( - auto_shortflags=False, - help={"force": "Force the git push"}, -) -def deploy(ctx, force=False): - fl._check_branch(ctx) - fl._check_no_uncommitted_changes(ctx) - fl.check(ctx) - force = "--force-with-lease " if (force or fl.config.force) else "" - fl.run_local(ctx, f"git push origin {force}{fl.config.branch}") - fl.run_local(ctx, "yarn run rsbuild build") - - with fl.Connection(fl.config.host) as conn, conn.cd(fl.config.domain): - fl._deploy_sync_origin_url(ctx, conn) - fl._deploy_django(conn) - fl.run( - conn, - "if [ -e static ]; then find static/ -type f -mtime +60 -delete;fi", - ) - fl.run_local( - ctx, - f"rsync -pthrz --stats tmp/dist/static/ {fl.config.host}:{fl.config.domain}/static/", - ) - fl._deploy_staticfiles(conn) - fl._nine_restart(conn) - - fl.fetch(ctx) - fl.progress(f"Successfully deployed the {fl.config.environment} environment.") - - -ns = fl.Collection(*fl.GENERAL, dev, deploy) +ns = fl.Collection(*fl.GENERAL, dev)