From 9d06d46bfb2256af59e9d0d97639efd7011607fd Mon Sep 17 00:00:00 2001 From: "bruno.thomas" Date: Mon, 18 Dec 2023 20:09:39 +0100 Subject: [PATCH] removed crontab entries only if there are entries --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a40656f..c9ea35b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: chmod 600 ~/.ssh/pkey eval "$(ssh-agent -s)" ssh-add ~/.ssh/pkey - ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && cd ../frontend-vue && npm install && npm run build && crontab -r && echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab -e" \ No newline at end of file + ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && cd ../frontend-vue && npm install && npm run build && crontab -l >/dev/null 2>&1 && crontab -r && echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab -e" \ No newline at end of file