Skip to content

Commit 7379e2b

Browse files
authored
Update update-readme.yml
1 parent dbf0ac5 commit 7379e2b

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/update-readme.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: Update README with Plugins List
22

33
on:
44
push:
5+
branches:
6+
- gh-pages
57
paths:
6-
- 'badges.json' # Trigger only when badges.json is updated
8+
- 'badges.json'
79
workflow_dispatch: # Allows manual trigger
810

911
jobs:
@@ -16,14 +18,21 @@ jobs:
1618
with:
1719
fetch-depth: 0
1820

21+
- name: Switch to main branch
22+
run: |
23+
git checkout main
24+
echo "::notice::Checked out main branch."
25+
26+
- name: Pull badges.json from gh-pages
27+
run: |
28+
git checkout gh-pages -- badges.json
29+
echo "::notice::Pulled badges.json from gh-pages branch."
30+
1931
- name: Set up Node.js
2032
uses: actions/setup-node@v3
2133
with:
2234
node-version: '18'
2335

24-
- name: Install dependencies
25-
run: npm install axios
26-
2736
- name: Generate new README
2837
run: node update-readme.js
2938

@@ -58,7 +67,7 @@ jobs:
5867
echo "" >> issue-content.md
5968
echo "Please review the changes and open a pull request from this branch." >> issue-content.md
6069
echo "" >> issue-content.md
61-
echo "**Compare Changes:** [View on GitHub](https://github.com/${{ github.repository }}/compare/gh-pages...${{ env.BRANCH_NAME }})" >> issue-content.md
70+
echo "**Compare Changes:** [View on GitHub](https://github.com/${{ github.repository }}/compare/main...${{ env.BRANCH_NAME }})" >> issue-content.md
6271
6372
- name: Create GitHub Issue for PR Notification
6473
if: env.skip != 'true'

0 commit comments

Comments
 (0)