Netlify-cms: Skip CI when uploading / removing an image

Created on 7 Oct 2019  ·  4Comments  ·  Source: netlify/netlify-cms

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

Most helpful comment

Yes we can!

All 4 comments

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

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

Hey @tomrutgers, can we close this?

Yes we can!

Was this page helpful?
0 / 5 - 0 ratings