forked from MicrosoftDocs/edge-developer
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (42 loc) · 1.54 KB
/
cleanup-tools.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: "clean repo"
on:
schedule:
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
workflow_dispatch:
jobs:
clean-repo:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
# Call clean repo
- name: Clean repo
id: clean-repo-step
uses: dotnet/docs-tools/cleanrepo/CleanRepo@main
with:
docfx_directory: './microsoft-edge'
articles_directory: './microsoft-edge'
media_directory: './microsoft-edge'
snippets_directory: './microsoft-edge'
includes_directory: './microsoft-edge'
url_base_path: '/microsoft-edge'
delete: true
orphaned_articles: true
orphaned_images: true
catalog_images: false
orphaned_snippets: false
orphaned_includes: false
replace_redirects: false
relative_links: true
remove_hops: true
# Create the PR for the work done by the "clean repo" tool
- name: create-pull-request
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54
with:
branch: bot/cleanrepo-pull-request
title: "Monthly chores: Automated repo cleanup"
commit-message: 'Bot 🤖 generated CleanRepo tool run'
body: "Find and delete orphaned articles and images. Remove redirection hops and replace site-relative links with file-relative links."