Skip to content
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

Tools/build pdfs only when needed #84

Merged
merged 34 commits into from
Aug 3, 2023
Merged

Conversation

ralfhandl
Copy link
Contributor

Fixes #56

@ralfhandl ralfhandl marked this pull request as ready for review August 3, 2023 10:37
HeikoTheissen
HeikoTheissen previously approved these changes Aug 3, 2023
git diff-index --quiet HEAD $dir/*.html $dir/styles/* || npm run pdf $doc
done
git add docs/*/*.pdf
git diff-index --quiet HEAD || ( git commit -m "auto-refreshed" && git push )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A non-selective git diff-index after a selective git add always returns 1, see SAP/odata-vocabularies#271.

An unconditional git push leads to an error when not on a branch (for example, when this check runs after pushing a tag).

Copy link
Contributor Author

@ralfhandl ralfhandl Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git diff-index is now selective, which should make git push conditional

@HeikoTheissen
Copy link
Contributor

HeikoTheissen commented Aug 3, 2023

If the CI workflow pushes additional commits to a pull request in this repository, the expected checks do not run after the additional commit, and the pull request cannot be merged (cf. my mail to our admin).

Let's wait until this is clarified before we merge improvements to the CI workflow.

The improvement to build-pdf.js is worth merging, however.

@ralfhandl
Copy link
Contributor Author

The improvement to build-pdf.js is worth merging, however.

#85, please review & merge

@ralfhandl ralfhandl merged commit 7b782e5 into main Aug 3, 2023
1 check passed
@ralfhandl ralfhandl deleted the tools/build-pdfs-only-when-needed branch August 3, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node CI: only build PDFs whose html/css sources have changed
2 participants