1
0
mirror of synced 2025-12-19 18:10:59 -05:00

cap check-all-english-links and upload log file (#30092)

This commit is contained in:
Peter Bengtsson
2022-08-19 20:11:21 +02:00
committed by GitHub
parent 6ad4e45012
commit 420ea91b81
2 changed files with 9 additions and 1 deletions

View File

@@ -73,10 +73,12 @@ jobs:
cat /tmp/stderr.log cat /tmp/stderr.log
- name: Run script - name: Run script
timeout-minutes: 120
env: env:
# The default is 300 which works OK on a fast macbook pro # The default is 300 which works OK on a fast macbook pro
# but not so well in Actions. # but not so well in Actions.
LINKINATOR_CONCURRENCY: 100 LINKINATOR_CONCURRENCY: 100
LINKINATOR_LOG_FILE_PATH: linkinator.log
run: | run: |
script/check-english-links.js > broken_links.md script/check-english-links.js > broken_links.md
@@ -88,6 +90,10 @@ jobs:
# #
# https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions # https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: linkinator_log
path: linkinator.log
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 - uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
if: ${{ failure() }} if: ${{ failure() }}
with: with:

View File

@@ -28,6 +28,8 @@ const checker = new LinkChecker()
const root = 'http://localhost:4000' const root = 'http://localhost:4000'
const englishRoot = `${root}/en` const englishRoot = `${root}/en`
const LINKINATOR_LOG_FILE_PATH =
process.env.LINKINATOR_LOG_FILE_PATH || path.join(__dirname, '../.linkinator/full.log')
// When using the peter-evans/create-issue-from-file Action to post an // When using the peter-evans/create-issue-from-file Action to post an
// issue comment you might get an error like this: // issue comment you might get an error like this:
// //
@@ -105,7 +107,7 @@ main()
async function main() { async function main() {
// Clear and recreate a directory for logs. // Clear and recreate a directory for logs.
const logFile = path.join(__dirname, '../.linkinator/full.log') const logFile = LINKINATOR_LOG_FILE_PATH
rimraf.sync(path.dirname(logFile)) rimraf.sync(path.dirname(logFile))
await mkdirp(path.dirname(logFile)) await mkdirp(path.dirname(logFile))