-
Notifications
You must be signed in to change notification settings - Fork 21
49 lines (44 loc) · 1.17 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
49
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
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
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_changed }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
- name: Set output
run: echo "docs_changed=${{ steps.filter.outputs.docs }}" >> $GITHUB_OUTPUT