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

Skip CI when uploading / removing an image #2733

Closed
tomrutgers opened this issue Oct 7, 2019 · 4 comments
Closed

Skip CI when uploading / removing an image #2733

tomrutgers opened this issue Oct 7, 2019 · 4 comments

Comments

@tomrutgers
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When an editor uploads or removes an image through the CMS, a new build is triggered on Netlify, eating away build minutes when no actual changes are made to the website.

Describe the solution you'd like

I'd like to be able to skip these builds by configuring a commit message (like [skip ci] on Netlify).

Describe alternatives you've considered

Setting commit messages for various actions, configurable from config.yml

@maximeduhamel
Copy link

Hi @tomrutgers,

I ran into that issue as well and in case you are still wondering it is possible to achieve this.
It is still a beta feature but it works like a charm on my end.

You can add commit message configuration to your backend in config.yml:

backend:
  commit_messages:
    create: '[skip ci] Create {{collection}} “{{slug}}”'
    update: '[skip ci] Update {{collection}} “{{slug}}”'
    delete: '[skip ci] Delete {{collection}} “{{slug}}”'
    uploadMedia: '[skip ci] Upload “{{path}}”'
    deleteMedia: '[skip ci] Delete “{{path}}”'

You would then need to trigger the build on Netlify via the provided Trigger Deploy UI button or via a custom webhook

You can find the doc at the bottom of this page:
https://www.netlifycms.org/docs/beta-features/

I hope it helps

@tomrutgers
Copy link
Contributor Author

@maximeduhamel I completely missed the custom commit messages beta, thanks! Works like a charm.

@erezrokah
Copy link
Contributor

Hey @tomrutgers, can we close this?

@tomrutgers
Copy link
Contributor Author

Yes we can!

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

No branches or pull requests

3 participants