clean repo #10
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: "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." |