cap check-all-english-links and upload log file (#30092)
This commit is contained in:
@@ -73,10 +73,12 @@ jobs:
|
||||
cat /tmp/stderr.log
|
||||
|
||||
- name: Run script
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
# The default is 300 which works OK on a fast macbook pro
|
||||
# but not so well in Actions.
|
||||
LINKINATOR_CONCURRENCY: 100
|
||||
LINKINATOR_LOG_FILE_PATH: linkinator.log
|
||||
run: |
|
||||
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
|
||||
|
||||
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
||||
with:
|
||||
name: linkinator_log
|
||||
path: linkinator.log
|
||||
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
|
||||
@@ -28,6 +28,8 @@ const checker = new LinkChecker()
|
||||
const root = 'http://localhost:4000'
|
||||
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
|
||||
// issue comment you might get an error like this:
|
||||
//
|
||||
@@ -105,7 +107,7 @@ main()
|
||||
|
||||
async function main() {
|
||||
// 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))
|
||||
await mkdirp(path.dirname(logFile))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user