-
Notifications
You must be signed in to change notification settings - Fork 21
48 lines (43 loc) · 1.16 KB
/
check-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
name: check-links
on:
pull_request:
types:
- opened
- synchronize
jobs:
check-links:
runs-on: ubuntu-latest
needs: changed-files
if: needs.changed-files.outputs.docs_changed == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # v1.207.0
with:
ruby-version: '3.4.1'
bundler-cache: true
cache-version: 0
- name: Install Dependencies
run: |
cd docs
make install
- name: Check Links
run: |
cd docs
make check-links
# This job detects if any files changed in a given path
changed-files:
runs-on: ubuntu-latest
outputs:
docs_changed: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
docs:
- 'docs/**'
- name: Set output
run: echo "docs_changed=${{ steps.filter.outputs.docs }}" >> $GITHUB_OUTPUT