automated django receive hook on server: respond to collectstatic with “yes”

后端 未结 2 1500
情话喂你
情话喂你 2021-02-01 00:12

I\'m using a Github post-recieve hook to run a bash file that pulls both my repos.

#!/bin/sh
cd ~/public_html/repo_static
env -i /usr/bin/git pull origin master
         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-01 01:02

    If you'd like to specify the default answer, you could also just pipe it into the command:

    $ echo yes | python manage.py collectstatic
    

    or

    $ echo no | python manage.py collectstatic
    

提交回复
热议问题