-
Notifications
You must be signed in to change notification settings - Fork 107
79 lines (68 loc) · 2.3 KB
/
broken-link-check.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This is a basic workflow to help you get started with Actions
name: Broken Link Checker
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
check_html_links_job:
runs-on: ubuntu-latest
name: Check-Links-Action
steps:
- uses: snow-actions/[email protected]
name: Checkout Azure/azure-sdk-for-java
with:
patterns: |
sdk/spring eng sdk/keyvault sdk/boms sdk/aot sdk/jdbc
repository: Azure/azure-sdk-for-java
ref: main
path: azure-sdk-for-java
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'oracle'
cache: maven
- name: Build latest azure-sdk-for-java repository
run: |
cd azure-sdk-for-java
mvn clean install -Dmaven.javadoc.skip=true -DskipTests \
-Dcheckstyle.skip=true \
-ntp \
-Dspotbugs.skip=true \
-Drevapi.skip=true -Djacoco.skip=true \
-Dparallel-test-playback \
-Pdev \
-f sdk/spring/pom.xml
- uses: actions/checkout@v2
- name: Build Docs
run: |
./mvnw clean install -P docs -pl docs -DskipTests
- name: Check link in generated html files
id: html-link-report
uses: peter-evans/link-checker@v1
with:
args: -d --document-root ./docs/target/generated-docs -r -x "https://my.custom.endpoint.com:55300|localhost"
- name: Replace bata to main in html-link-report result
run: |
if [ -d "link-checker/" ] ; then
cd link-checker
sudo sed -i 's/spring-cloud-azure_*.*.*-beta.[0-9]/main/g' *
sudo sed -i 's/```/ /g' *
sudo mv out.md ../
fi
- name: Remove files generated at build-time.
run: |
./mvnw clean
- name: Check link in all markdown files
uses: gaurav-nelson/[email protected]
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/workflows/markdown-link-check-config.json'