Wikipedia:WikiProject Articles for creation/Helper script/Deploying

If you are an interface administrator and you would like to update AFCH's code on Wikipedia to match the code located at the official GitHub repository (basically deploying approved patches to production), follow this work instruction.

To update AFCH to its latest version onwiki, you need to do the following.

First time



 * Special:BotPasswords
 * Provide the permissions shown in the image to the right.
 * Note down the password and save it in a text file.
 * This is important especially if you have 2FA enabled (which you will need if you are a intadmin) since pywikibot cannot bypass 2FA and will be unable to login via non-BotPassword means.
 * Note: BotPasswords are global, not specific to a wiki. For example, you only need to create one BotPassword, even if you want to deploy to both enwiki and testwiki.

Every time

 * Note: For Windows, all commands need to be run on Git Bash and not in Powershell


 * Create a python environment using the following command:
 * Activate the Python environment.
 * Windows:
 * Linux:
 * Install python packages using
 * Navigate (using ) into the directory containing the git repository.

First time

 * Run
 * select
 * select
 * username (for example: )
 * do you want to add other projects?
 * select
 * select
 * username (for example: )
 * do you want to provide a bot password?
 * bot name: (for example: )
 * password
 * no
 * no

Every time

 * Sync your GitHub forked repo to the AFCH repo.
 * Make sure you don't have uncommitted changes. If you do, the deploy will fail silently.
 * Close Dropbox, so you don't get "failed to remove some directories/files" warnings due to file locks.
 * Run
 * Run
 * Run  to login, verify that the last line says
 * If any files were created since the last time you deployed, create them with empty content. Else the deploy script will not be able to edit them.
 * Depending on your wiki...
 * testwiki:
 * enwiki:
 * Double check all diffs carefully by visiting Special:MyContributions and looking for problems. There have been bugs in the past.
 * enwiki:
 * Double check all diffs carefully by visiting Special:MyContributions and looking for problems. There have been bugs in the past.

Editors familiar with the deploy script
Have deployed to enwiki before:


 * User:Enterprisey
 * User:Novem Linguae

Knowledgeable of some of the process:


 * User:Sohom Datta
 * User:SD0001