-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (46 loc) · 1.67 KB
/
check-external-links.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Check external links
on:
workflow_run:
workflows: [ "Gatsby Publish" ]
types:
- completed
branches:
- 'main'
defaults:
run:
shell: bash
concurrency:
group: uses-github-api # do not allow any concurrency to avoid re-triggering the rate limiter
jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: write
repository-projects: read
statuses: read
if: github.event.workflow_run.event == 'schedule' && github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: "npm" # this only caches global dependencies
- run: npm ci --prefer-offline
- name: Download Built Artifact
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # token with actions:read permissions on target repo
run-id: ${{ github.event.workflow_run.id }}
path: public/
name: site
- run: npm run test:links
continue-on-error: true # problems will be tracked by defects raised by the next job, not by build failures
env:
CI: true
PATH_PREFIX: "${{ github.ref_name == 'main' && 'extensions' || '' }}"
PATH_PREFIX_FLAG: "${{ github.ref_name == 'main' && '--prefix-paths' || '' }}"
- name: Raise defects if needed
uses: jbangdev/jbang-action@v0.119.0
with:
script: site-validation/dead-link-issue.java
scriptargs: token=${{ secrets.GITHUB_TOKEN }} issueRepo=${{ github.repository }} runId=${{ github.run_id }} siteUrl=https://quarkus.io/extensions