Skip to content

Commit 236e29b

Browse files
authored
Update docsupdater.yaml
1 parent 5f3ca52 commit 236e29b

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

Diff for: .github/workflows/docsupdater.yaml

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
name: Update docs/docs/index.md
2-
on: push
3-
permissions:
4-
pull-requests: write
5-
contents: write
6-
repository-projects: write
2+
3+
on:
4+
push:
5+
branches:
6+
- master
77

88
jobs:
99
update-docs:
1010
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Git
14-
run: |
15-
git config --global user.name "Anselm Kiefner"
16-
git config --global user.email "[email protected]"
17-
- name: Update docs/docs/index.md
18-
run: |
19-
echo "Generating docs/docs/index.md..."
20-
cat README.md > docs/docs/index.md
21-
- name: Commit and push changes
22-
run: |
23-
git add docs/docs/index.md
11+
12+
steps:z
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Generate docs/docs/index.md
17+
run: |
18+
echo "Generating docs/docs/index.md..."
19+
cat README.md > docs/docs/index.md
20+
21+
- name: Commit changes
22+
run: |
23+
git add docs/docs/index.md
24+
if [ -n "$(git status --porcelain)" ]; then
2425
git commit -m "Update docs/docs/index.md"
2526
git push
27+
else
28+
echo "No changes to commit"
29+
fi

0 commit comments

Comments
 (0)