Skip to content

Commit 1ef8ccf

Browse files
docs(ci): validate docs build on PRs targeting master (#6351)
* ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> * ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> * ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> * ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> * ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> * ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> * ci: validate docs build on PRs targeting master Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com> --------- Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
1 parent e1817f2 commit 1ef8ccf

3 files changed

Lines changed: 38 additions & 9 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,52 @@
1-
name: Release Docs
1+
name: Docs
22

33
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- "docs/**"
9+
- "mkdocs.yml"
10+
- ".github/workflows/docs.yaml"
411
# See https://docs.github.com/fr/webhooks/webhook-events-and-payloads#workflow_dispatch
512
# Can be used to update doc with latest tag
613
workflow_dispatch:
7-
tag:
8-
description: "Build documentation for specified tag value"
9-
required: true
10-
type: string
14+
inputs:
15+
tag:
16+
description: "Build documentation for specified tag value"
17+
required: true
18+
type: string
1119

1220
permissions: {}
1321

1422
jobs:
23+
build_docs:
24+
name: Lint Docs
25+
runs-on: ubuntu-latest
26+
if: github.event_name == 'pull_request'
27+
steps:
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
fetch-depth: 0
31+
32+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
33+
with:
34+
python-version: "3.12"
35+
cache: "pip"
36+
cache-dependency-path: "./docs/scripts/requirements.txt"
37+
38+
- run: pip install -r docs/scripts/requirements.txt
39+
40+
- name: lint and build docs
41+
run: mkdocs build --strict
42+
1543
release_docs:
1644
permissions:
1745
contents: write # for mike to push
1846

1947
name: Release Docs
2048
runs-on: ubuntu-latest
49+
if: github.event_name == 'workflow_dispatch'
2150
steps:
2251
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2352
with:
@@ -29,8 +58,7 @@ jobs:
2958
cache: "pip"
3059
cache-dependency-path: "./docs/scripts/requirements.txt"
3160

32-
- run: |
33-
pip install -r docs/scripts/requirements.txt
61+
- run: pip install -r docs/scripts/requirements.txt
3462

3563
- name: Configure Git user
3664
run: |
@@ -39,6 +67,6 @@ jobs:
3967
4068
- name: build and push
4169
run: |
42-
VERSION="${{ input.tag }}"
70+
VERSION="${{ inputs.tag }}"
4371
mike deploy $VERSION --push --update-aliases
4472
mike set-default --push latest

docs/contributing/dev-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Building and/or testing `external-dns` requires additional tooling.
2727

2828
### Go Tools
2929

30-
Additional Go-based tools are managed in [`go.tool.mod`](../../go.tool.mod) and used for code generation:
30+
Additional Go-based tools are managed in `go.tool.mod` and used for code generation:
3131

3232
| Tool | Purpose |
3333
|-----------------------------------------------------------------------|----------------------------------------------------|

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ nav:
4040
- Rate Limits: docs/advanced/rate-limits.md
4141
- TTL: docs/advanced/ttl.md
4242
- Decisions: docs/proposal/0*.md
43+
- Decision Template: docs/proposal/design-template.md
4344
- Domain Filter: docs/advanced/domain-filter.md
4445
- Configuration Precedence: docs/advanced/configuration-precedence.md
4546
- Split Horizon DNS: docs/advanced/split-horizon.md

0 commit comments

Comments
 (0)