Skip to content

Commit 856ff1e

Browse files
committed
2 parents 68eac8a + 2ff23bc commit 856ff1e

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed

.github/workflows/cleanrepo.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,59 @@
1-
2-
name: "clean repo - ATADocs"
1+
name: "Clean Repo"
32

43
on:
54
schedule:
6-
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
5+
- cron: "0 1 1 * *"
76
workflow_dispatch:
87

98
permissions:
10-
contents: read
9+
contents: write
10+
pull-requests: write
1111

1212
jobs:
1313
clean-repo:
1414
runs-on: ubuntu-latest
15-
permissions:
16-
contents: write
17-
pull-requests: write
1815

1916
steps:
17+
- uses: actions/checkout@v5
2018

21-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22-
23-
# Find orphaned articles
24-
- name: Clean repo - orphaned articles
19+
- name: Clean orphaned articles
2520
uses: dotnet/docs-tools/cleanrepo@main
2621
with:
2722
function: "FindOrphanedArticles"
28-
docfx_directory: "ATADocs"
29-
target_directory: "ATADocs"
23+
docfx_directory: "."
24+
target_directory: "."
3025
url_base_path: "/dotnet"
3126

32-
# Find orphaned images
33-
- name: Clean repo - orphaned images
27+
- name: Clean orphaned images
3428
uses: dotnet/docs-tools/cleanrepo@main
3529
with:
3630
function: "FindOrphanedImages"
37-
docfx_directory: "ATADocs"
38-
target_directory: "ATADocs"
31+
docfx_directory: "."
32+
target_directory: "."
3933
url_base_path: "/dotnet"
4034

41-
# Find orphaned includes
42-
- name: Clean repo - orphaned includes
35+
- name: Clean orphaned includes
4336
uses: dotnet/docs-tools/cleanrepo@main
4437
with:
4538
function: "FindOrphanedIncludes"
46-
docfx_directory: "ATADocs"
47-
target_directory: "ATADocs"
39+
docfx_directory: "."
40+
target_directory: "."
4841
url_base_path: "/dotnet"
4942

50-
# Find orphaned snippets
51-
- name: Clean repo - orphaned snippets
43+
- name: Clean orphaned snippets
5244
uses: dotnet/docs-tools/cleanrepo@main
5345
with:
5446
function: "FindOrphanedSnippets"
55-
docfx_directory: "ATADocs"
56-
target_directory: "ATADocs"
47+
docfx_directory: "."
48+
target_directory: "."
5749
url_base_path: "/dotnet"
5850

59-
# Create the PR for the work done by the "clean repo" tool
60-
- name: create-pull-request
51+
- name: Create pull request
6152
uses: dotnet/actions-create-pull-request@v4
6253
with:
6354
branch: cleanrepo-orphaned-articles
64-
title: "Monthly chores: Delete orphaned articles"
55+
title: "Monthly chores: Delete orphaned content"
6556
commit-message: "Bot 🤖 generated CleanRepo tool run"
66-
body: "Find and delete orphaned articles. Contributes to #..."
57+
body: |
58+
This PR was generated by the Clean Repo GitHub Action.
59+
It includes automated cleanup of orphaned content across the entire repo.

0 commit comments

Comments
 (0)