diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index b6efec0a4d2..6efcb8aaf93 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -177,26 +177,39 @@ jobs: docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html docs (cd docs && git commit -a -m 'new') .ci/create-changes-html.sh $(cd docs && git rev-parse HEAD^) docs - # "rm -rf .git" may error out because of some hidden diehard files; hence we just move it out of docs + # Previous "rm -rf .git" sometimes errors out because of some hidden diehard files. + # Hence we simply move it out of docs directory (cd docs && mv .git ../git) mv CHANGES.html docs # Zip everything for increased performance zip -r docs.zip docs + # We move .git back into docs directory + mv git docs/.git - name: Upload docs + id: upload if: (success() || failure()) && steps.copy.outcome == 'success' uses: actions/upload-artifact@v4 with: name: docs path: docs.zip + - name: Save space + id: savespace + if: (success() || failure()) && steps.upload.outcome == 'success' + run: | + set -ex + # Save space on runner device before we start to build livedoc + rm -rf docs/ + rm -f docs.zip + # # On release tags: live doc and wheels # - name: Build live doc id: buildlivedoc - if: (success() || failure()) && steps.container.outcome == 'success' && startsWith(github.ref, 'refs/tags/') + if: (success() || failure()) && startsWith(github.ref, 'refs/tags/') run: | export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5 export PATH="build/bin:$PATH" @@ -215,11 +228,11 @@ jobs: if: (success() || failure()) && steps.buildlivedoc.outcome == 'success' run: | mkdir -p ./livedoc - cp -r -L /sage/local/share/doc/sage/html ./livedoc - cp -r -L /sage/local/share/doc/sage/pdf ./livedoc - cp /sage/local/share/doc/sage/index.html ./livedoc + # We copy everything to a local folder + docker cp --follow-link BUILD:/sage/local/share/doc/sage/html livedoc + docker cp --follow-link BUILD:/sage/local/share/doc/sage/pdf livedoc + docker cp BUILD:/sage/local/share/doc/sage/index.html livedoc zip -r livedoc.zip livedoc - shell: sh .ci/docker-exec-script.sh BUILD . {0} - name: Upload live doc if: (success() || failure()) && steps.copylivedoc.outcome == 'success'