@@ -135,14 +135,7 @@ jobs:
135
135
echo "robots.txt creation skipped for production URL."
136
136
fi
137
137
138
- - name : Upload artifact for link checker
139
- if : github.event_name == 'pull_request' || contains(github.event.head_commit.message, '[link-check]')
140
- uses : actions/upload-artifact@v4
141
- with :
142
- name : built-site-for-lychee
143
- path : public/
144
-
145
- - name : Upload artifact for deployment
138
+ - name : Upload artifact
146
139
uses : actions/upload-pages-artifact@v3.0.1
147
140
with :
148
141
path : ./public
@@ -152,11 +145,11 @@ jobs:
152
145
needs : build
153
146
if : github.event_name == 'pull_request' || contains(github.event.head_commit.message, '[link-check]')
154
147
steps :
155
- - name : Download built site artifact
148
+ - name : Download artifact
156
149
uses : actions/download-artifact@v4
157
150
with :
158
- name : built-site-for-lychee
159
- path : public
151
+ name : github-pages
152
+ path : ./ public
160
153
161
154
- name : List downloaded files # Debugging step
162
155
run : ls -R public
@@ -173,7 +166,8 @@ jobs:
173
166
id : lychee
174
167
uses : lycheeverse/lychee-action@v2
175
168
with :
176
- workingDirectory : ./public
169
+ # Run lychee from inside the 'public' directory
170
+ working-directory : ./public
177
171
args : >-
178
172
--cache
179
173
--max-cache-age 1d
@@ -185,7 +179,8 @@ jobs:
185
179
--exclude 'https://github.com/open-neuromorphic/open-neuromorphic.github.io/issues/new/choose'
186
180
'./**/*.html'
187
181
fail : false
188
- jobSummary : true
182
+ job_summary : true
183
+ # This output path is now relative to the working-directory
189
184
output : ./lychee-out.md
190
185
env :
191
186
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -195,6 +190,7 @@ jobs:
195
190
uses : peter-evans/create-issue-from-file@v5
196
191
with :
197
192
title : Link Checker Report
193
+ # The report is inside the 'public' directory
198
194
content-filepath : ./public/lychee-out.md
199
195
labels : report, automated, broken-links
200
196
@@ -204,6 +200,7 @@ jobs:
204
200
url : ${{ steps.deployment.outputs.page_url }}
205
201
runs-on : ubuntu-24.04
206
202
needs : build
203
+ # Only deploy on pushes to the main branch, not on pull requests
207
204
if : github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/cache-images')
208
205
steps :
209
206
- name : Deploy to GitHub Pages
0 commit comments