contentful_update #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
repository_dispatch: | |
types: [contentful_update] | |
permissions: | |
id-token: write | |
contents: read # This is required for actions/checkout | |
jobs: | |
commit_changes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Create changes from webhook payload | |
run: | | |
curl --request GET https://api.contentful.com/spaces/${{ github.event.client_payload.spaceID }}/users/${{ github.event.client_payload.userID }} -H 'Authorization: Bearer ${{ secrets.CONTENTFUL_TOKEN }}' | jq '.firstName + " " + .lastName + " made a change to contentful"' > CONTENTFUL_CHANGELOG.md | |
- name: Commit and Push Changes | |
run: | | |
echo ${{ secrets.SIGNING_KEY }} > signingkey.key | |
gpg --import signingkey.key | |
git config user.email "[email protected]" | |
git config user.name "jasonbellONS" | |
git config user.signingkey 4EBD94281429A316 | |
git config commit.gpgsign true | |
git commit -am "User changes to contentful content model" | |
git push |