@@ -10,7 +10,6 @@ permissions:
10
10
contents : read
11
11
pages : write
12
12
id-token : write
13
- issues : write # Add this permission for creating issues
14
13
15
14
env :
16
15
HUGO_ENV : production
@@ -141,61 +140,36 @@ jobs:
141
140
path : ./public
142
141
143
142
link-checker :
144
- runs-on : ubuntu-latest
143
+ runs-on : ubuntu-24.04
145
144
needs : build
146
- if : github.event_name == 'pull_request' # Only run on pull requests
147
145
steps :
148
146
- name : Download artifact
149
147
uses : actions/download-artifact@v4
150
148
with :
151
149
name : github-pages
152
150
path : ./public
153
-
154
- - name : Restore lychee cache
155
- uses : actions/cache@v4
156
- with :
157
- path : ./.lycheecache
158
- key : lychee-cache-${{ github.ref }}
159
- restore-keys : |
160
- lychee-cache-
161
-
162
151
- name : Link Checker
163
- id : lychee
164
- uses : lycheeverse/lychee-action@v2
152
+ uses : lycheeverse/lychee-action@v1.11.0
165
153
with :
166
- # Check all HTML files in the downloaded public directory
167
154
args : >-
168
- --cache
169
- --max-cache-age 1d
170
155
--verbose
171
156
--exclude-mail
172
157
--exclude-all-private
173
158
--exclude 'https://www.linkedin.com/.*'
174
159
--exclude 'https://twitter.com/intent/.*'
175
160
--exclude 'https://github.com/open-neuromorphic/open-neuromorphic.github.io/issues/new/choose'
176
- './public/**/*.html'
177
- fail : false # Do not fail the workflow, create an issue instead
178
- job_summary : true
179
- output : ./lychee-out.md
161
+ './**/*.html'
180
162
env :
181
163
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
182
164
183
- - name : Create Issue From File
184
- if : steps.lychee.outputs.exit_code != 0
185
- uses : peter-evans/create-issue-from-file@v5
186
- with :
187
- title : Link Checker Report
188
- content-filepath : ./lychee-out.md
189
- labels : report, automated, broken-links
190
-
191
165
deploy :
192
166
environment :
193
167
name : github-pages
194
168
url : ${{ steps.deployment.outputs.page_url }}
195
169
runs-on : ubuntu-24.04
196
170
needs : build
197
171
# Only deploy on pushes to the main branch, not on pull requests
198
- if : github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/cache-images')
172
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
199
173
steps :
200
174
- name : Deploy to GitHub Pages
201
175
id : deployment
0 commit comments