Skip to content

Commit d6ebaf2

Browse files
PCrnjakclaude
andcommitted
publish.yml: social cards need ENABLE_SOCIAL=true and the Cairo libraries
"1" came through the !ENV tag as the integer 1, which the social plugin refuses (it wants a boolean); and the Ubuntu runner needs the Cairo development libraries Material for MkDocs lists for the plugin. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 08f41c8 commit d6ebaf2

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# the source must be "Deploy from a branch", branch gh-pages, folder / (root).
66
#
77
# A strict build runs first: a broken link or a missing page publishes nothing. Social cards are built here only
8-
# (ENABLE_SOCIAL=1; they need cairo, which the local builds skip).
8+
# (ENABLE_SOCIAL=true; they need the Cairo libraries, which the local builds skip).
99
#
1010
# The root of gh-pages also carries 404.html (source: tools/root_404.html), which forwards the addresses from before
1111
# the versioning (/STEPFOC-docs/can/) to the same page under latest/. The last step keeps it up to date.
@@ -34,14 +34,16 @@ jobs:
3434
with:
3535
python-version: "3.11"
3636
cache: pip
37+
- name: Libraries for the social cards (Cairo, as Material for MkDocs documents)
38+
run: sudo apt-get update -q && sudo apt-get install -y -q libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
3739
- run: pip install -r requirements.txt
3840
- run: python tools/test_tools.py
3941
- run: mkdocs build --strict
4042
env:
41-
ENABLE_SOCIAL: "1"
43+
ENABLE_SOCIAL: "true"
4244
- name: Publish this version with mike
4345
env:
44-
ENABLE_SOCIAL: "1"
46+
ENABLE_SOCIAL: "true"
4547
run: |
4648
git config user.name "github-actions[bot]"
4749
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

‎mkdocs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ plugins:
6464
- glightbox # click any image to zoom
6565
- social:
6666
cards_layout: default
67-
enabled: !ENV [ENABLE_SOCIAL, false] # social cards only in CI (they need cairo + pillow)
67+
enabled: !ENV [ENABLE_SOCIAL, false] # social cards only in CI (ENABLE_SOCIAL=true; they need Cairo + Pillow)
6868
# The addresses of the pages before the manual was restructured (firmware 103 and older) keep working.
6969
- redirects:
7070
redirect_maps:

0 commit comments

Comments
 (0)