15
15
SKETCHES_REPORTS_ARTIFACT_NAME : libraries-report
16
16
RESULT_LIBRARY_TEST_FILE : LIBRARIES_TEST.md
17
17
JSON_LIBRARY_LIST_FILE : .github/workflows/lib.json
18
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
19
+
18
20
jobs :
19
21
compile-sketch :
20
22
if : |
80
82
# Check out repository
81
83
- name : Checkout repository
82
84
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
83
92
84
93
# This step is needed to get the size data produced by the compile jobs
85
94
- name : Download sketches reports artifact
@@ -95,22 +104,17 @@ jobs:
95
104
destination-file : ${{ env.RESULT_LIBRARY_TEST_FILE }}
96
105
97
106
- 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 }}
104
109
105
110
- name : Push to github repo
106
111
run : |
107
112
git config user.name github-actions
108
113
git config user.email [email protected]
109
- git checkout gh-pages
110
114
git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
111
115
git commit -m "Generated External Libraries Test Results"
112
- git push
113
-
116
+ git push origin HEAD:gh-pages
117
+
114
118
event_file :
115
119
name : " Event File"
116
120
if : |
@@ -122,4 +126,4 @@ jobs:
122
126
uses : actions/upload-artifact@v2
123
127
with :
124
128
name : Event File
125
- path : ${{github.event_path}}
129
+ path : ${{github.event_path}}
0 commit comments