js-shield
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Today's meeting


From: Michael McMahon
Subject: Re: Today's meeting
Date: Wed, 20 Mar 2024 12:03:14 -0400
User-agent: Icedove Mail

Here is how the cronjob works on the jshelter.org server.

The cronjob is called from this file:

/etc/cron.d/update-jshelterstatic

BEGIN update-jshelterstatic

* * * * * webfiles timeout 5m /usr/local/bin/deploy_script.sh

END update-jshelterstatic

That file points to this script:

/usr/local/bin/deploy_script.sh

BEGIN deploy_script.sh

set -euo pipefail

SCR_NAME="$(basename "$0")"
PID="$(echo $$)"
if [ $(ps -ef | grep $SCR_NAME | grep -v -e su -e timeout -e grep -e $PID | wc -l) -gt 0 ]; then
  exit
fi

cd /home/webfiles/webextension/website/

git fetch -q &>/dev/null || git fetch
git pull -q &>/dev/null || git pull

make html &>/dev/null || make html

rsync -rc output/ /var/www/html/

END deploy_script.sh

Any changes manually pushed /var/www/html/ will get clobbered by the rsync every minute or so the /home/webfiles/webextension/website/ directory needs to be set to the branch that will be production. The current branch is set to main.

To change the production branch, we would run a variation of these commands:

ssh root@jshelter.org
su webfiles
cd ~/webextension/website/
git checkout branchname
exit
exit

Best,
Michael McMahon | GNU/Linux Systems Administrator, Free Software Foundation
GPG Key: 4337 2794 C8AD D5CA 8FCF  FA6C D037 59DA B600 E3C0
https://fsf.org

Register for LibrePlanet 2024: https://libreplanet.org/2024/

US government employee? Use CFC charity code 63210 to support us
through the Combined Federal Campaign. https://cfcgiving.opm.gov/

Boost our advocacy for free software in education: Donate to help
us reach our stretch goal of USD $425,000! https://donate.fsf.org

On 3/20/24 11:08, Ricardo Lafuente wrote:
On 2024-03-19 17:11, Libor Polčák wrote:
Do you have a link please?

Best wishes

Libor

We deployed it but for some reason it's being reverted to the previous website version. I can see the updated links for ~1minute, but reloading brings me to the previous version. Michael, maybe this is the auto-deploy kicking in? If so, can you pull the latest website version?

The website branch has a working local version with links to the Doxygen contents -- see below, the "technical docs" link takes you to the relevant Doxygen page.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]