-
Notifications
You must be signed in to change notification settings - Fork 34
65 lines (51 loc) · 1.56 KB
/
main.yml
File metadata and controls
65 lines (51 loc) · 1.56 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
62
63
64
65
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize, reopened]
jobs:
build-and-deploy-documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Cache Python dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
path: .cache
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install linkchecker
- name: Validate image links in Markdown
run: python .github/scripts/validate_images.py
- name: Find unused local images
run: python .github/scripts/find_unused_images.py
- name: Validate Markdown meta-data
run: python .github/scripts/validate_markdown_metadata.py
- name: Build English Documentation
run: mkdocs build -f config/en/mkdocs.yml
- name: Build German Documentation
run: mkdocs build -f config/de/mkdocs.yml
- name: Copy common root files (including legacy redirects)
run: cp -R docs/root/* site
- name: Check links
run: |
linkchecker site/
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master' && success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site