kossiitkgp / kwoc-2018

Web app for Kharagpur Winter of Code, 2018
https://kwoc.kossiitkgp.org
MIT License
0 stars 0 forks source link

Add an automation script to update website with git. #131

Closed thealphadollar closed 5 years ago

thealphadollar commented 5 years ago

This issue needs research but there are multiple methods by which we can sync local code with GitHub repo automatically. Currently, we have to run a script called update.sh which runs the following commands.

git add .
git stash
git fetch origin
git rebase origin/master
git stash apply
sudo systemctl restart kwoc.service

Problems we are facing in creating a cron script:

We can surely overcome the problems but it needs a little bit of research.

cc/ @OrkoHunter You insights would be helpful here.

thealphadollar commented 5 years ago

Well the issue of changing users (because of entering password) has been dealt by exempting the user kwoc from entering password for using systemctl.

https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/

cc/ @DefCon-007

thealphadollar commented 5 years ago

Done via 498363f5a928f8ff971ae0d0abe9218cb8ab80c3

Also added details to README.md