actions-gh-pages
actions-gh-pages copied to clipboard
output final commit sha
Is your feature request related to a problem? Please describe
No
Describe the solution you'd like
core.setOutput('sha', sha)
so user can access this commit by ${{ steps.gh-pages.outputs.sha}}
Describe alternatives you've considered
Additional context
Thank you for suggesting this!
Yes. That looks useful. A longer option name may be easier to understand as follows.
core.setOutput('pages_commit_hash', sha);
I also considered the following output parameter names.
published_commit_hashdeployed_commit_hashgenerated_commit_hash
We want to differentiate a publish_branch's commit hash from source branch's one. Does anybody have any better ideas of the output parameter name? Please tell us here!
I will work on this with #300, #344, and others.
How about src_sha and dst_sha?
Cool!
We already have ${{ github.sha }} in the GitHub Actions contexts. (src_sha)
The GitHub Actions context uses github.sha so we will choose dst_sha. (destination)
Thanks @sidvishnoi
Could someone test #514 as follows?
- name: Deploy
uses: peaceiris/actions-gh-pages@7e55c73 #514
id: pages
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: echo ${{ steps.pages.outputs.dst_sha }}
Could someone test #514 as follows?
I tested this on a current workflow I'm using for an Hugo site and it works as expected :+1:
Thanks a lot for this feature!