github-pages-deploy-action icon indicating copy to clipboard operation
github-pages-deploy-action copied to clipboard

Include source commit message in deploy commit message

Open JamesIves opened this issue 3 years ago • 1 comments

Discussed in https://github.com/JamesIves/github-pages-deploy-action/discussions/993

Originally posted by curiousdannii January 7, 2022 I'd like to be able to include the source commit's message (or the first line at least) in the deploy commit message, so that it says something like

Deploying to gh-pages from @ 84666d3 🚀 Catch errors for uploaded files, fixes #108

I see that there is a commit-message config option, but the docs don't really explain how to use it, so I'm not sure if this sort of customisation would be possible already, or if it would need changes to the action.

JamesIves avatar Jan 07 '22 14:01 JamesIves

I don't think including the source commit title in the default deploy commit message is good, but +1 to docs that show users how to do this.

In https://github.com/related-sciences/nxontology-data/commit/4b118f0abe8cc87b53c21c0e114ab652a18e3f96, I made a custom commit message like:

      with:
        commit-message: |
          Export ${{ github.event.inputs.source }}
          
          Ontology generated from source code at ${{ github.sha }}.
          Run in https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
          Triggered by @${{ github.actor }}.

Unlikely to have a one size fits all solution by default, but examples are nice.

dhimmel avatar Feb 14 '23 00:02 dhimmel