MyWiki:WikiProject Articles for creation/Helper script/Deploying

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by imported>Novem Linguae at 01:09, 6 December 2025 (Undid revision 1325927469 by Novem Linguae (talk)). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

Method 1

[edit source]
  • Be an interface administrator
  • Visit https://gadget-deploy.toolforge.org/
  • Pick the appropriate gadget from the dropdown
  • Click "Deploy to English Wikipedia"
  • An OAuth prompt will appear. Click "Allow"
  • When it's done, analyze the diffs and make sure there weren't any bugs.

Method 2

[edit source]
  • Be an interface administrator
  • Navigate to your forked origin repo on github.com, and sync it with the upstream fork. (You can skip this if your origin is the gadget repo itself and not a fork.)
  • git checkout master
  • git pull
  • npm ci
  • Create a Special:BotPasswords with permissions to write to the MediaWiki namespace.
  • Make sure you've created a scripts/credentials.json file with your bot password. Example
    • {
      	"site": "https://en.wikipedia.org/w/api.php",
      	"username": "Your username@Bot task",
      	"password": "Your password"
      }
      
  • npm run deploy
  • When it's done, analyze the diffs and make sure there weren't any bugs.