1515 SKETCHES_REPORTS_ARTIFACT_NAME : libraries-report
1616 RESULT_LIBRARY_TEST_FILE : LIBRARIES_TEST.md
1717 JSON_LIBRARY_LIST_FILE : .github/workflows/lib.json
18+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
19+
1820jobs :
1921 compile-sketch :
2022 if : |
8082 # Check out repository
8183 - name : Checkout repository
8284 uses : actions/checkout@v3
85+ with :
86+ token : ${{ env.GITHUB_TOKEN }}
87+ fetch-depth : ' 0'
88+
89+ - name : Switch branch
90+ run :
91+ git checkout remotes/origin/gh-pages
8392
8493 # This step is needed to get the size data produced by the compile jobs
8594 - name : Download sketches reports artifact
@@ -95,22 +104,17 @@ jobs:
95104 destination-file : ${{ env.RESULT_LIBRARY_TEST_FILE }}
96105
97106 - name : Append file with action URL
98- uses : DamianReeves/write-file-action@master
99- with :
100- path : ${{ env.RESULT_LIBRARY_TEST_FILE }}
101- contents : |
102- / [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
103- write-mode : append
107+ run :
108+ echo "/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" >> ${{ env.RESULT_LIBRARY_TEST_FILE }}
104109
105110 - name : Push to github repo
106111 run : |
107112 git config user.name github-actions
108113 git config user.email github-actions@github.com
109- git checkout gh-pages
110114 git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
111115 git commit -m "Generated External Libraries Test Results"
112- git push
113-
116+ git push origin HEAD:gh-pages
117+
114118 event_file :
115119 name : " Event File"
116120 if : |
@@ -122,4 +126,4 @@ jobs:
122126 uses : actions/upload-artifact@v2
123127 with :
124128 name : Event File
125- path : ${{github.event_path}}
129+ path : ${{github.event_path}}
0 commit comments