Skip to content

Commit 3ca525e

Browse files
authored
Check README links are alive (#15)
Check README links are alive on PR open, merge and after pushing a new javadoc version to `gh-pages`.
1 parent d0fa2f3 commit 3ca525e

File tree

3 files changed

+38
-12
lines changed

3 files changed

+38
-12
lines changed

.github/workflows/pr.yml

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ jobs:
4545
if: ${{ steps.diff.outputs.all_modified_files }}
4646
run: python3 -m unittest discover -bs .github/scripts
4747

48+
readme-links-test:
49+
needs: [choose-dry-runs]
50+
uses: ./.github/workflows/test-readme-links.yml
51+
4852
choose-dry-runs:
4953
runs-on: ubuntu-latest
5054
outputs:

.github/workflows/publish-javadoc.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ defaults:
2020
run:
2121
shell: bash
2222

23-
env:
24-
JAR_NAME: gradle-enterprise-api-kotlin-SNAPSHOT-javadoc.jar
25-
2623
jobs:
2724

2825
build-javadoc:
@@ -33,9 +30,9 @@ jobs:
3330
- name: Build javadoc
3431
uses: ./.github/actions/build
3532
with:
36-
tasks: 'javadocJar'
37-
artifact-name: 'javadoc'
38-
path-to-upload: "build/libs/${{ env.JAR_NAME }}"
33+
tasks: 'dokkaHtml'
34+
artifact-name: 'docs'
35+
path-to-upload: "build/dokka/html/**/*"
3936

4037
publish-javadoc:
4138
needs: [build-javadoc]
@@ -45,13 +42,12 @@ jobs:
4542
uses: actions/checkout@v3
4643
with:
4744
ref: gh-pages
48-
- name: Download javadoc
45+
- name: Delete current javadoc
46+
run: rm -rf docs
47+
- name: Download new javadoc
4948
uses: actions/download-artifact@v3
50-
- name: Unzip javadoc
51-
run: |
52-
rm -rf docs
53-
unzip "javadoc/$JAR_NAME" -d docs
54-
rm -rf javadoc
49+
with:
50+
path: ./
5551
- name: Commit
5652
run: |
5753
git config user.name github-actions
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 'Check PR'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- gh-pages
8+
workflow_call:
9+
workflow_dispatch:
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
17+
test-readme-links:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
- name: Check README links
23+
uses: gaurav-nelson/github-action-markdown-link-check@v1
24+
with:
25+
folder-path: .
26+
max-depth: 1

0 commit comments

Comments
 (0)