Skip to content

Commit 6c75126

Browse files
authored
Update main.yml
1 parent 072c202 commit 6c75126

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'readme.md'
8+
- 'README.md'
99

1010
jobs:
1111
update-docs:
@@ -22,10 +22,10 @@ jobs:
2222
2323
- name: Check if README was updated
2424
run: |
25-
if git diff --name-only HEAD^ HEAD | grep 'readme.md'; then
26-
echo "readme.md has changed"
25+
if git diff --name-only HEAD^ HEAD | grep 'README.md'; then
26+
echo "README.md has changed"
2727
else
28-
echo "readme.md has not changed" && exit 0
28+
echo "README.md has not changed" && exit 0
2929
fi
3030
3131
- name: Generate random number for branch name
@@ -38,10 +38,10 @@ jobs:
3838
cd cls-repo
3939
4040
# Copy updated README to target directory in the CLSFramework.github.io repository
41-
cp ../readme.md docs/6-basecode/py2d/index.md
41+
cp ../README.md docs/6-basecode/py2d/index.md
4242
4343
# Create a new branch with a random number appended
44-
git checkout -b update-readme-py2d-${{ steps.random.outputs.random_number }}
44+
git checkout -b update-README-py2d-${{ steps.random.outputs.random_number }}
4545
4646
- name: Add front matter to index.md before committing
4747
run: |
@@ -59,12 +59,12 @@ jobs:
5959
cd cls-repo
6060
git add docs/6-basecode/py2d/index.md
6161
git commit -m "Update py2d documentation from README"
62-
git push origin update-readme-py2d-${{ steps.random.outputs.random_number }}
62+
git push origin update-README-py2d-${{ steps.random.outputs.random_number }}
6363
6464
- name: Create Pull Request in CLSFramework.github.io using GitHub API
6565
run: |
6666
PR_RESPONSE=$(curl -X POST -H "Authorization: token ${{ secrets.GH_TOKEN }}" \
6767
-H "Accept: application/vnd.github.v3+json" \
6868
https://api.github.com/repos/CLSFramework/CLSFramework.github.io/pulls \
69-
-d '{"title":"Update py2d documentation","head":"update-readme-py2d-${{ steps.random.outputs.random_number }}","base":"main","body":"This PR updates the py2d documentation based on changes made in README.md."}')
69+
-d '{"title":"Update py2d documentation","head":"update-README-py2d-${{ steps.random.outputs.random_number }}","base":"main","body":"This PR updates the py2d documentation based on changes made in README.md."}')
7070
echo "Pull request created: $PR_RESPONSE"

0 commit comments

Comments
 (0)