File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,11 +23,14 @@ jobs:
2323 uses : actions/checkout@v4
2424 with :
2525 ref : gh-pages
26- fetch-depth : 0
2726
28- # 2. Fetch main branch for scripts and other files
29- - name : Fetch main branch
30- run : git fetch origin main:main-for-scripts
27+ # 2. Fetch main branch for scripts
28+ - name : Checkout main for scripts
29+ uses : actions/checkout@v4
30+ with :
31+ ref : main
32+ fetch-depth : 1
33+ path : ../main-scripts
3134
3235 # 3. Setup Node.js (for Axe and http-server)
3336 - name : Set up Node.js
@@ -97,12 +100,8 @@ jobs:
97100 env :
98101 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
99102 run : |
100- # Copy scripts from main-for-scripts branch
101- cp -r main-for-scripts/.github/scripts .github/
102- chmod +x .github/scripts/push-badge.sh
103-
104103 # 1. Calculate the score and create the JSON file
105- node .github/scripts/generate-badge.js
104+ node ../main-scripts/. github/scripts/generate-badge.js
106105
107106 # 2. Push to the orphaned 'badges' branch using Force Push
108- bash .github/scripts/push-badge.sh
107+ bash ../main-scripts/. github/scripts/push-badge.sh
You can’t perform that action at this time.
0 commit comments