Skip to content

[daily] 4x

[daily] 4x #1976

Workflow file for this run

name: "[daily] 4x"
# Clean/userpageDelete.js
# Clean/redirectDelete.js
# Clean/invisibleCharacter.js
on:
schedule:
- cron: "35 19,2,9,14 * * *" # 3:35, 10:35, 17:35, 22:35 CST
workflow_dispatch:
inputs:
task:
type: choice
required: true
options:
- "userpage-deletion"
- "redirect-deletion"
- "invisible-character"
env:
MOEGIRL_API_USER_AGENT: ${{ secrets.MOEGIRL_API_USER_AGENT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
userpage-deletion:
if: |
github.event_name == 'schedule' ||
github.event.inputs.task == 'userpage-deletion'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node Version
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Script
env:
ZH_ABOT: ${{ secrets.ZH_ABOT }}
run: node src/Clean/userpageDelete.js
redirect-deletion:
if: |
github.event_name == 'schedule' ||
github.event.inputs.task == 'redirect-deletion'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node Version
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Script
env:
ZH_ABOT: ${{ secrets.ZH_ABOT }}
run: node src/Clean/redirectDelete.js
invisible-character:
needs: [userpage-deletion, redirect-deletion]
if: |
github.event_name == 'schedule' && needs.userpage-deletion.result == 'success' && needs.redirect-deletion.result == 'success' ||
github.event.inputs.task == 'invisible-character'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node Version
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run Script
env:
ZH_BOT: ${{ secrets.ZH_BOT }}
run: node src/Clean/invisibleCharacter.js