Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 70bf761

Browse files
Added path restriction
1 parent e4a9374 commit 70bf761

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/copy-documentation-readme-upwards.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- main
77
- dev/upm-readiness
8+
paths:
9+
- '**/Packages/com.*/Documentation~/README.md'
810

911
jobs:
1012
copy-documentation-readme-upwards:
@@ -19,18 +21,11 @@ jobs:
1921
git config user.email [email protected]
2022
$readmeDir = Get-Item -Path "**/Packages/com.*/Documentation~" | Select-Object -ExpandProperty FullName
2123
$readmeDir = $readmeDir.replace('${{ github.workspace }}/','')
22-
echo $readmeDir
2324
$readmeContent = gc (Get-Item -Path "**/Packages/com.*/Documentation~/README.md") -Raw
2425
$readmeContent = $readmeContent -replace '(\[.*\])\(((?!https?:\/\/).+)\)',('$1('+$readmeDir+'/$2)')
25-
echo $readmeContent
26-
echo "v.s."
2726
Set-Content README.md $readmeContent
28-
$targetContent = gc README.md -Raw
29-
echo $targetContent
30-
echo Compare-Object ($readmeContent | out-string) ($targetContent | out-string)
31-
if (-not Compare-Object ($readmeContent | out-string) ($targetContent | out-string)) {echo "eq"} else {echo "ne"}
32-
# Set-Content ./README.md $readmeContent
33-
# git add ./README.md
34-
# git commit -m 'Copied repo README from package README'
27+
git add README.md
28+
git commit -m 'Copied repo README from package README'
29+
git push
3530
working-directory: ${{ github.workspace }}
3631
shell: pwsh

0 commit comments

Comments
 (0)