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

deploy/gh-pages: Avoid unnecessary deploys #8

Open
sidvishnoi opened this issue Aug 25, 2020 · 2 comments
Open

deploy/gh-pages: Avoid unnecessary deploys #8

sidvishnoi opened this issue Aug 25, 2020 · 2 comments
Labels
enhancement Enhancement to an existing feature

Comments

@sidvishnoi
Copy link
Member

Do not deploy if nothing other than the publish date (and similar things) have changed.

@sidvishnoi sidvishnoi added the enhancement Enhancement to an existing feature label Aug 25, 2020
@sidvishnoi
Copy link
Member Author

sidvishnoi commented Aug 25, 2020

In a ReSpec document, the "no-diff" looks like following:
image

Edit: above can be filtered with:

git show -p -U0 --diff-filter=M \
  | grep '^[+-]' | grep -Ev '^(--- a/|\+\+\+ b/)' \ # https://stackoverflow.com/a/26622262
  | grep -v publishISODate \
  | grep -Ev "meta.+generator" \
  | grep -v "dt-published" \
  | grep -Pv "generatedSubtitle.+\d{1,2} \w+ \d{4}"
  | cat # avoid error-exit on no match.

@sidvishnoi sidvishnoi changed the title Avoid unnecessary deploys deploy/gh-pages: Avoid unnecessary deploys Aug 26, 2020
@sidvishnoi
Copy link
Member Author

An alternative could be to use puppeteer and set the "no-diff" fields (like dates, meta[generator]) to same values using DOM manipulation, and then compare resulting (prettified) HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant