Skip to content

Rename 2

Rename 2 #7

name: copy-documentation-readme-upwards
on:
push:
branches:
- main
- dev/upm-readiness
jobs:
copy-documentation-readme-upwards:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: copy documentation readme upwards
run: |
git config user.name github-actions
git config user.email [email protected]
$readmeDir = Get-Item -Path "**/Packages/com.*/Documentation~" | Select-Object -ExpandProperty FullName
$readmeDir = $readmeDir.replace('${{ github.workspace }}/','')
echo $readmeDir
$readmeContent = gc (Get-Item -Path "**/Packages/com.*/Documentation~/README.md") -Raw
$readmeContent = $readmeContent -replace '(\[.*\])\(((?!https?:\/\/).+)\)',('$1('+$readmeDir+'$2)')
echo (gc README.md -Raw)
# Set-Content ./README.md $readme
# git add ./README.md
# git commit -m 'Copied repo README from package README'
working-directory: ${{ github.workspace }}
shell: pwsh