Skip to content

Commit bdd1e54

Browse files
authored
[docs] Updates starter pack & enables GA (#226)
1 parent b1d52d7 commit bdd1e54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1626
-2159
lines changed
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
name: Main Documentation Checks
1+
#
2+
name: Automatic doc checks
23

34
on:
4-
- push
5-
- pull_request
6-
- workflow_dispatch
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
paths:
9+
- 'docs/**' # Only run on changes to the docs directory
10+
11+
workflow_dispatch:
12+
# Manual trigger
13+
714

815
concurrency:
916
group: ${{ github.workflow }}-${{ github.ref }}
@@ -13,4 +20,5 @@ jobs:
1320
documentation-checks:
1421
uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main
1522
with:
16-
working-directory: 'docs'
23+
working-directory: "docs"
24+
fetch-depth: 0

docs/.custom_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ intel
1919
IPEX
2020
ipynb
2121
ITEX
22+
jovyan
2223
Jupyter
2324
jupyter
2425
JupyterLab

docs/.github/workflows/automatic-doc-checks.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/.gitignore

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
/*env*/
1+
# Environment
2+
*env*/
23
.sphinx/venv/
3-
.sphinx/requirements.txt
4+
5+
# Sphinx
46
.sphinx/warnings.txt
57
.sphinx/.wordlist.dic
68
.sphinx/.doctrees/
9+
.sphinx/update/
710
.sphinx/node_modules/
8-
package*.json
11+
12+
# Vale
13+
.sphinx/styles/*
14+
.sphinx/vale.ini
15+
16+
# Build outputs
917
_build
18+
19+
# Node.js
20+
package*.json
21+
22+
# Unrelated cache and config files
1023
.DS_Store
1124
__pycache__
1225
.idea/

docs/.readthedocs.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ build:
1212
python: "3.11"
1313
jobs:
1414
post_checkout:
15-
- cd docs && python3 .sphinx/build_requirements.py
15+
- git fetch --unshallow || true
16+
# Cancel building pull requests when there aren't changed in the docs directory.
17+
# If there are no changes (git diff exits with 0) we force the command to return with 183.
18+
# This is a special exit code on Read the Docs that will cancel the build immediately.
19+
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
20+
- |
21+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- 'docs/' '.readthedocs.yaml';
22+
then
23+
exit 183;
24+
fi
1625
1726
# Build documentation in the docs/ directory with Sphinx
1827
sphinx:
@@ -22,9 +31,9 @@ sphinx:
2231

2332
# If using Sphinx, optionally build your docs in additional formats such as PDF
2433
formats:
25-
- pdf
34+
- pdf
2635

2736
# Optionally declare the Python requirements required to build your docs
2837
python:
29-
install:
30-
- requirements: docs/.sphinx/requirements.txt
38+
install:
39+
- requirements: docs/requirements.txt

docs/.sphinx/.markdownlint.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"default": false,
3+
"MD003": {
4+
"style": "atx"
5+
},
6+
"MD014": true,
7+
"MD018": true,
8+
"MD022": true,
9+
"MD023": true,
10+
"MD026": {
11+
"punctuation": ".,;。,;"
12+
},
13+
"MD031": {
14+
"list_items": false
15+
},
16+
"MD032": true,
17+
"MD035": true,
18+
"MD042": true,
19+
"MD045": true,
20+
"MD052": true
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: make-spelling
5+
name: Run make spelling
6+
entry: make -C docs spelling
7+
language: system
8+
pass_filenames: false
9+
files: ^docs/.*\.(rst|md|txt)$
10+
11+
- id: make-linkcheck
12+
name: Run make linkcheck
13+
entry: make -C docs linkcheck
14+
language: system
15+
pass_filenames: false
16+
files: ^docs/.*\.(rst|md|txt)$
17+
18+
- id: make-woke
19+
name: Run make woke
20+
entry: make -C docs woke
21+
language: system
22+
pass_filenames: false
23+
files: ^docs/.*\.(rst|md|txt)$

0 commit comments

Comments
 (0)