Skip to content

Commit 7ef1e41

Browse files
author
Release Manager
committedOct 23, 2023
sagemathgh-36475: .github/workflows/doc-build.yml: Repair display of changes <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> From sagemath#36473 (comment) <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> - Depends on sagemath#36473 (merged here) - Depends on sagemath#36442 (merged here) <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36475 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee
2 parents 9b6b0e3 + 76c8549 commit 7ef1e41

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed
 

‎.github/workflows/doc-build.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,17 @@ jobs:
5656
git config --global --add safe.directory $(pwd)
5757
git config --global user.email "ci-sage@example.com"
5858
git config --global user.name "Build & Test workflow"
59+
mathjax_path_from=$(SAGE_USE_CDNS=no /sage/sage -python -c "from sage_docbuild.conf import mathjax_path; print(mathjax_path)")
5960
.ci/retrofit-worktree.sh worktree-image /sage
6061
# Keep track of changes to built HTML
61-
new_version=$(cat src/VERSION.txt); (cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage '$new_version' /'; git init && (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; git add -A && git commit --quiet -m "old")
62+
new_version=$(cat src/VERSION.txt)
63+
mathjax_path_to=$(SAGE_USE_CDNS=yes /sage/sage -python -c "from sage_docbuild.conf import mathjax_path; print(mathjax_path)")
64+
(cd /sage/local/share/doc/sage/html/en && \
65+
find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage '$new_version' /;s,'$mathjax_path_from,$mathjax_path_to,';'; \
66+
git init && \
67+
(echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && \
68+
(echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; \
69+
git add -A && git commit --quiet -m "old")
6270
6371
- name: Download upstream artifact
6472
uses: actions/download-artifact@v3
@@ -77,7 +85,7 @@ jobs:
7785
id: incremental
7886
run: |
7987
# Now re-bootstrap and build. The build is incremental because we were careful with the timestamps.
80-
./bootstrap && make build
88+
./bootstrap && make sagemath_doc_html-build-deps
8189
working-directory: ./worktree-image
8290
env:
8391
MAKE: make -j2 --output-sync=recurse
@@ -88,7 +96,7 @@ jobs:
8896
if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success'
8997
run: |
9098
set -ex
91-
make sagelib-clean && git clean -fx src/sage && ./config.status && make build
99+
make sagelib-clean && git clean -fx src/sage && ./config.status && make sagemath_doc_html-build-deps
92100
working-directory: ./worktree-image
93101
env:
94102
MAKE: make -j2 --output-sync=recurse
@@ -105,7 +113,7 @@ jobs:
105113
mv /sage/local/share/doc/sage/html/en/.git /sage/.git-doc
106114
make doc-clean doc-uninstall
107115
mkdir -p /sage/local/share/doc/sage/html/en/ && mv /sage/.git-doc /sage/local/share/doc/sage/html/en/.git
108-
./config.status && make doc-html
116+
./config.status && make sagemath_doc_html-no-deps
109117
working-directory: ./worktree-image
110118
env:
111119
MAKE: make -j2 --output-sync=recurse

0 commit comments

Comments
 (0)