WikiMedia - Fetch the list of obsolete pages #974
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "WikiMedia - Fetch the list of obsolete pages" | |
on: | |
# Run on cron, daily at 5:30am UTC. | |
schedule: | |
- cron: '30 5 * * *' | |
# Run on request. | |
workflow_dispatch: | |
inputs: | |
debug: | |
type: boolean | |
required: false | |
description: 'Set the debug mode' | |
jobs: | |
run: | |
# Only run on the canonical repository. | |
if: github.repository == 'moodle/devdocs' | |
name: Update obsoletions and migrations with Wikimedia | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Run update script | |
run: yarn wikimedia-sync fetch-obsolete | |
env: | |
DEBUG: ${{ github.event.inputs.debug }} | |
WIKIMEDIA_DEBUG: ${{ github.event.inputs.debug }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
add-paths: | | |
data/*.json | |
commit-message: "[repo] Update list of obsolete pages" | |
title: "[repo] Update list of obsolete pages" | |
branch: obsolete-legacy-page-list | |
signoff: false | |
delete-branch: true |