Skip to content

Commit ce09b87

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

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/update-readme.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ jobs:
1717
uses: actions/checkout@v3
1818
with:
1919
fetch-depth: 0
20+
ref: main # Checkout the main branch first
2021

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
22+
- name: Fetch gh-pages branch
2723
run: |
24+
git fetch origin gh-pages:gh-pages
2825
git checkout gh-pages -- badges.json
2926
echo "::notice::Pulled badges.json from gh-pages branch."
3027
28+
- name: Switch back to main branch
29+
run: |
30+
git checkout main
31+
echo "::notice::Switched back to main branch."
32+
3133
- name: Set up Node.js
3234
uses: actions/setup-node@v3
3335
with:

0 commit comments

Comments
 (0)