Skip to main content

Auto-deploy from Github, workaround with cronjob and bash

Comments

2 comments

  • cPanelLauren
    To my knowledge, there is nothing involved with this that would be affected by a cPanel updated. When you say it is bypassing what is the output it gives? What is the output of the following: git version which git git status
    Furthermore, where are you defining REPO_DIR and DEPLOY_DIR variables? What happens when you run a git pull
    directly from the repo?
    0
  • Marasi
    I have found the solution, The output from: git pull | grep 'Already up to date.'
    When I run from Bash returns 'Already up to date.'. But when I run by CRON the output is 'Already up-to-date.'. (See the hyphens). Wy is that? I have no idea. So, that's it. I have change my code to: git pull | grep 'Already up[ -]to[ -]date.'
    And now it is working like it should.
    0

Please sign in to leave a comment.