Repository navigation
61 lines (53 loc) · 1.74 KB
/
Copy pathtechdocs.yml
File metadata and controls
61 lines (53 loc) · 1.74 KB
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
# Keeps the GitHub docs and the Backstage catalog/TechDocs in sync.
#
# The freundcloud Backstage instance auto-discovers this repo via its GitHub
# org provider and rebuilds TechDocs on-demand from the repo, so there is no
# push step here. This workflow's job is to guarantee that whatever lands on
# main is always valid Backstage format:
# 1. catalog-info.yaml validates against the Backstage entity schema.
# 2. The TechDocs site builds cleanly (--strict) with the real techdocs-core
# plugin, exactly as Backstage builds it.
# A PR cannot merge unless both hold, so the catalog never drifts from the docs.
name: TechDocs & Catalog
on:
push:
branches: [main]
paths:
- doc/**
- mkdocs.yml
- catalog-info.yaml
- .github/workflows/techdocs.yml
pull_request:
paths:
- doc/**
- mkdocs.yml
- catalog-info.yaml
- .github/workflows/techdocs.yml
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
name: Validate catalog + build TechDocs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate catalog-info.yaml (Backstage entity schema)
uses: RoadieHQ/backstage-entity-validator@v0.5.0
with:
path: catalog-info.yaml
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install TechDocs toolchain
run: pip install mkdocs-techdocs-core
- name: Build TechDocs (strict)
run: mkdocs build --strict --site-dir _techdocs-site
- name: Upload TechDocs artifact
uses: actions/upload-artifact@v4
with:
name: techdocs-site
path: _techdocs-site
retention-days: 14