Problem
We could have caught the latest error in the documentation build and push job if we built the PDFs every time.
Proposed Solution
Only keep this condition in the "push" step of the job; remove it from the dependencies and document generation steps.
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}