This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
revert #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: actions/checkout@v4 | |
name: Checkout Azure/azure-sdk-for-java | |
with: | |
repository: 'Azure/azure-sdk-for-java' | |
path: 'azure-sdk-for-java' | |
ref: main | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build latest azure-sdk-for-java repository | |
run: | | |
cd azure-sdk-for-java | |
mvn clean install \ | |
-Dcheckstyle.skip=true \ | |
-Dcodesnippet.skip \ | |
-Denforcer.skip \ | |
-Djacoco.skip=true \ | |
-Dmaven.javadoc.skip=true \ | |
-Drevapi.skip=true \ | |
-DskipTests \ | |
-Dspotbugs.skip=true \ | |
-Pdev -T 4 -ntp -f sdk/spring/pom.xml | |
- uses: actions/checkout@v4 | |
- 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' |