Skip to content

Commit f153381

Browse files
committed
update fabric
1 parent de73a73 commit f153381

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

fabfile.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22
from invoke import run
33
from patchwork.transfers import rsync
44

5-
@task(hosts=["zodman@inertia.opensrc.mx",])
6-
def deploy(ctx):
7-
run("yarn install", echo=True)
5+
@task
6+
def local(ctx):
87
run('rm .cache demo/static/src/app.css -rf', echo=True)
8+
run("find . -name '__pycache__' |xargs rm -rf ", echo=True)
9+
run("yarn install", echo=True)
910
run("yarn run build", echo=True)
1011
run("python manage.py collectstatic --noinput", echo=True)
11-
run("find . -name '__pycache__' |xargs rm -rf ", echo=True)
12-
rsync(ctx, "static/", "apps/django-inertia-demo/")
1312

13+
@task(hosts=["zodman@go.opensrc.mx",])
14+
def deploy(ctx):
1415
with ctx.prefix("source ~/.virtualenvs/inertia/bin/activate"):
1516
with ctx.cd("apps/django-inertia-demo"):
1617
ctx.run("git pull")
1718
ctx.run("pip install -r requirements.txt")
1819
ctx.run("python manage.py migrate")
1920
ctx.run("python populate.py")
21+
ctx.run("python manage.py collectstatic --noinput")
22+
rsync(ctx, "static/", "apps/django-inertia-demo/")
2023
ctx.run("sudo supervisorctl restart inertia")
2124

0 commit comments

Comments
 (0)