diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1308cf9b..6c1b6b97 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -243,6 +243,10 @@ jobs: chmod +x /home/admin/projectlab/app/profilesmigration.sh echo "0 13 * * * /home/admin/projectlab/app/profilesmigration.sh" | crontab - + echo "*** Cron job to get github activity ****" + chmod +x /home/admin/projectlab/app/githubActivity.sh + echo "0 0 * * * /home/admin/projectlab/app/githubActivity.sh" | crontab - + echo "*** Step: *** Start pm2 service" pm2 start ecosystem.config.js pm2 save diff --git a/githubActivity.sh b/githubActivity.sh new file mode 100644 index 00000000..b20dd31f --- /dev/null +++ b/githubActivity.sh @@ -0,0 +1,4 @@ +mkdir -p /home/admin/logs/githubjobs +LOGFILE="/home/admin/logs/githubjobs/projectsActivity-"$(date "+%Y%m%d%H%M%S")".log" +cd /home/admin/projectlab/app +npx ts-node --project ./ts-node.tsconfig.json ./tasks/GitHubDataManage/getGitHubActivityByProject.ts >> $LOGFILE \ No newline at end of file