-
Notifications
You must be signed in to change notification settings - Fork 5
Fix doc build outputs: replace epub with pdf, silence asciinema for non-HTML #1100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
66853f1
b1e41bb
98a88cd
148b44d
59a95bc
92e2529
902df7f
2e85650
9de09a9
b466a05
fd076ef
25b3130
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,11 @@ name: "Docs" | |||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| workflow_call: | ||||||||||||||||||||
| inputs: | ||||||||||||||||||||
| release_id: | ||||||||||||||||||||
| required: false | ||||||||||||||||||||
| type: string | ||||||||||||||||||||
| default: '' | ||||||||||||||||||||
|
Comment on lines
+5
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== docs workflow callers =="
rg -n -C3 'uses:\s*\.\/\.github\/workflows\/docs\.yml|release_id|prep-release' .github/workflows
echo
echo "== release_id producer =="
rg -n -C3 'outputs:|release_id|tag_name|upload_url|gh release|create[-_]release|action-gh-release' .github/workflowsRepository: dfetch-org/dfetch Length of output: 248 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Files in .github/workflows =="
ls -la .github/workflows/ | head -20
echo
echo "== Content of docs.yml (full) =="
cat .github/workflows/docs.yml
echo
echo "== Search for callers of docs.yml =="
grep -r "docs.yml" .github/workflows/ || echo "No callers found"
echo
echo "== Search for prep-release workflow =="
if [ -f .github/workflows/prep-release.yml ]; then
cat .github/workflows/prep-release.yml
else
echo "prep-release.yml not found"
fiRepository: dfetch-org/dfetch Length of output: 4446 🏁 Script executed: cat .github/workflows/ci.ymlRepository: dfetch-org/dfetch Length of output: 1076 🏁 Script executed: cat .github/workflows/release.ymlRepository: dfetch-org/dfetch Length of output: 2784 🌐 Web query:
💡 Result: The tag_name parameter for the softprops/action-gh-release GitHub Action is an optional string input that specifies the name of the tag for the GitHub release. Description: "Name of a tag. defaults to github.ref_name. refs/tags/ values are normalized to ." When omitted, it defaults to the current GitHub ref name (e.g., the tag name from a push event). It can be used to create releases for custom or existing tags, such as in examples like tag_name: stage-2026-03-15. This is documented in the official README inputs table. Citations:
Rename The variable named Also improve the condition from Suggested shape- release_id:
+ release_tag:
required: false
type: string
default: ''
…
- if: ${{ inputs.release_id }}
+ if: ${{ inputs.release_tag != '' }}
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.5.0
with:
- tag_name: ${{ inputs.release_id }}
+ tag_name: ${{ inputs.release_tag }}Also applies to: lines 106-110 🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| permissions: | ||||||||||||||||||||
| contents: read | ||||||||||||||||||||
|
|
@@ -26,7 +31,6 @@ jobs: | |||||||||||||||||||
| - name: Install documentation requirements | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| pip install .[docs] | ||||||||||||||||||||
| pip install sphinx_design | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Build docs | ||||||||||||||||||||
| run: "make -C doc html" | ||||||||||||||||||||
|
|
@@ -50,7 +54,6 @@ jobs: | |||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| pip install .[docs] | ||||||||||||||||||||
| pip install sphinx_design | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Build landing-page | ||||||||||||||||||||
| run: "make -C doc/landing-page html" | ||||||||||||||||||||
|
|
@@ -63,3 +66,50 @@ jobs: | |||||||||||||||||||
| external_repository: dfetch-org/dfetch-org.github.io | ||||||||||||||||||||
| publish_branch: main | ||||||||||||||||||||
| deploy_key: ${{ secrets.GH_DFETCH_ORG_DEPLOY }} | ||||||||||||||||||||
|
|
||||||||||||||||||||
| pdf: | ||||||||||||||||||||
| name: PDF Documentation | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
| permissions: | ||||||||||||||||||||
| contents: write | ||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - name: Harden the runner (Audit all outbound calls) | ||||||||||||||||||||
| uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| egress-policy: audit | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Setup Python | ||||||||||||||||||||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| python-version: '3.13' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install documentation requirements | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| pip install .[docs] | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install LaTeX | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| sudo apt-get install -y texlive-latex-recommended texlive-fonts-recommended \ | ||||||||||||||||||||
| texlive-latex-extra latexmk | ||||||||||||||||||||
|
Comment on lines
+92
to
+95
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add The Proposed fix - name: Install LaTeX
run: |
- sudo apt-get install -y texlive-latex-recommended texlive-fonts-recommended \
+ sudo apt-get update
+ sudo apt-get install -y texlive-latex-recommended texlive-fonts-recommended \
texlive-latex-extra latexmk📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Build PDF | ||||||||||||||||||||
| run: make -C doc latexpdf | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Store PDF artifact | ||||||||||||||||||||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| name: dfetch-pdf-documentation | ||||||||||||||||||||
| path: doc/_build/latex/dfetch-*.pdf | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Upload PDF to release | ||||||||||||||||||||
| if: ${{ inputs.release_id }} | ||||||||||||||||||||
| uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.5.0 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| tag_name: ${{ inputs.release_id }} | ||||||||||||||||||||
| files: doc/_build/latex/dfetch-*.pdf | ||||||||||||||||||||
| draft: true | ||||||||||||||||||||
| preserve_order: true | ||||||||||||||||||||
| env: | ||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"format": "png"} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Global PNG output can break existing hardcoded This forces PlantWeb artifacts to Suggested fix (update hardcoded extension)--- a/doc/landing-page/index.rst
+++ b/doc/landing-page/index.rst
@@
-:file: static/patch-diagram.svg
+:file: static/patch-diagram.pngIf you need mixed outputs by builder, consider making image references builder-aware instead of hardcoding one extension. 🤖 Prompt for AI Agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The finding is a false positive — no fix needed.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Since the landing page contains no (^• ω •^) 🐰 ✏️ Learnings added
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ sphinx: | |
| configuration: doc/conf.py | ||
|
|
||
| formats: | ||
| - epub | ||
| - htmlzip | ||
|
|
||
| build: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🏁 Script executed:
Repository: dfetch-org/dfetch
Length of output: 187
The unpinned TeX Live packages approach is justified by Debian's constraints.
The LaTeX packages are intentionally installed without version pins to avoid build failures when Debian TeX Live package versions change. This is documented in the inline comment and consistent with the CI workflow. However, Debian does not provide year-specific TeX Live packages (e.g.,
texlive-2023) that could be pinned as an alternative.Given this limitation, the current approach is reasonable. Consider documenting the reproducibility tradeoff in the project README or an Architecture Decision Record (ADR) so contributors understand that builds may vary slightly between environments or over time due to TeX Live updates.
Hadolint's DL3008 warning is valid for general container best practices, but this is an intentional exception justified by the TeX Live release cycle.
🧰 Tools
🪛 Hadolint (2.14.0)
[warning] 20-20: Pin versions in apt get install. Instead of
apt-get install <package>useapt-get install <package>=<version>(DL3008)
🤖 Prompt for AI Agents