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
Don't deploy on content-only changes #37
Comments
The approach I was following in that original attempt is probably sub-optimal. I think what would be best is to get the latest commit from the running app. Some sort of |
This is done. Took a completely different approach. Here's what I said in the remix discord about it: I finally got content-only changes to not deploy and instantly refresh the cache for the content 🎉 🚀 Don't deploy content-only changes: https://github.com/kentcdodds/remix-kentcdodds/blob/49d4f3f37c35f25fbc5a751ebe2b21fa42b4153c/.github/workflows/deployment.yml#L188-L206 🥬 Refresh content instantly: https://github.com/kentcdodds/remix-kentcdodds/blob/49d4f3f37c35f25fbc5a751ebe2b21fa42b4153c/.github/workflows/refresh-content.yml Basically, when the site is built, I generate this json file: https://kent.dev/build/info.json during CI, I compare the files that were changed between the last deployed commit with the commit that's being built and use that to determine whether it's content-only. Most folks don't need to bother with the non-deploy nonsense if they're using a real CMS. But I really like having my content in GitHub so people can make contributions to fix typos and stuff. This is an enormous improvement on my existing site. It took a lot more work, but it's awesome :slight_smile: |
Content is read from github directly (we'll fallback to local though #36), so there's no reason to deploy the app if the only change made is in content. Thanks to help from @alexanderson1993, I made it pretty far before: 822a168
The text was updated successfully, but these errors were encountered: