-
Notifications
You must be signed in to change notification settings - Fork 152
65 lines (64 loc) · 1.98 KB
/
menu-yaml-link-checker.yaml
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
name: Check for missing links in menu.yaml
on:
pull_request:
jobs:
check_menu_links:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.5.1"]
runs-on: ubuntu-latest
steps:
- name: setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.111.3"
extended: true
- uses: actions/checkout@v3
name: clone tyk-docs
- uses: actions/checkout@v3
name: clone tyk_libs
with:
repository: dcs3spp/tyk_libs
path: ./tyk_libs
- name: Prepare files to run script
run: |
cd ./tyk-docs
hugo
cp data/menu.yaml ../tyk_libs/
cp public/urlcheck.json ../tyk_libs/
- name: setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-${{ matrix.poetry-version }}-0
- name: install poetry
uses: snok/[email protected]
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: true
virtualenvs-in-project: true
- name: load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ./tyk-docs/tyk_libs/.venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry dependencies except the poetry project in pyproject.toml
run: |
cd ./tyk_libs
poetry install --no-interaction --no-root
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Install poetry project in pyproject.toml
run: |
cd ./tyk_libs
poetry install --no-interaction
- name: Run script to check for missing links in menu.yaml
run: |
cd ./tyk_libs
make find_missing_links