Mobile app version of vmapp.org
Login or Join
Sent6035632

: GitHub service to deploy via git-mediawiki I've been helping write documentation and manage the website for SuperTuxKart, an open-source racing game. The website uses MediaWiki, but we've discussed

@Sent6035632

Posted in: #Git #Github #Mediawiki #Suggestions #WebsiteDeployment

I've been helping write documentation and manage the website for SuperTuxKart, an open-source racing game. The website uses MediaWiki, but we've discussed things and decided after our switch away from SourceForge hosting not to allow free account creation. However, this left us in a dilemma as to how to allow contributions to the wiki while avoiding the spam accounts that plagued the previous one.

We decided that allowing pull requests to submit content to GitHub, then deploy it to MediaWiki would work well. After some research and experimenting, I created a semi-working shell script that uses git-mediawiki to


Clone the wiki
Push the wiki to GitHub
Fetch and merge changes from the wiki
Fetch and merge changes from GitHub (though the wiki has priority in case of a merge conflict)
Push to the wiki and to GitHub.


What I am looking for is a GitHub webhook service to run this script regularly (e.g. every 15 minutes) and whenever there is a commit to GitHub. It also needs some method of write access to the git repository without using my own credentials. I can't just have a script git pull updates to the server because MediaWiki pages can't be read from a normal git repository; they must be in a database.

The content of my script is below:

#!/bin/bash
#
# Auto sync script for the SuperTuxKart wiki

# Set up repo if not already done
if ! [ -d "supertuxkart.net" ]
then
echo "Setting up repository..."

git clone --origin wiki mediawiki::https://supertuxkart.net
cd "supertuxkart.net"
git remote add github github.com/MTres19/supertuxkart.net.git git push github master
fi


cd "supertuxkart.net"

git pull --rebase wiki
git pull --rebase -s recursive -X ours github master

git push wiki master
git push github master

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

1 Comments

Sorted by latest first Latest Oldest Best

 

@Goswami781

Seems super complicated compared to just filtering out spam registrations, e.g. by using reCaptcha or Google login.

If you are really intent on doing this, the GitHub extension and the mw-to-git tool seem like the most mature solutions.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme