Skip to content

clean repo - replace redirects #21

clean repo - replace redirects

clean repo - replace redirects #21

name: "clean repo - replace redirects"
on:
schedule:
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
workflow_dispatch:
permissions:
contents: read
jobs:
clean-repo:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# Call clean repo
- name: Clean repo
id: clean-repo-step
uses: dotnet/docs-tools/cleanrepo@main
with:
function: "ReplaceRedirectTargets"
docfx_directory: "."
target_directory: "docs"
url_base_path: "/dotnet"
# Create the PR for the work done by the "clean repo" tool
- name: create-pull-request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 #v8.0.0
with:
branch: cleanrepo-replace-redirects
title: "Monthly chores: Replace redirect targets"
commit-message: "Bot 🤖 generated CleanRepo tool run"
body: "Replace redirected links with target URL. Contributes to #..."