Skip to content

Commit

Permalink
Merge pull request #1546 from culturecreates/enhancement/issue-1545
Browse files Browse the repository at this point in the history
Updated deployment script to use licenseware/send-email-notification@v1
  • Loading branch information
AbhishekPAnil authored Jan 24, 2025
2 parents 5fd1b65 + 0a01fa0 commit 8d3731e
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/build-production-deploy-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,32 @@ jobs:
env:
DISTRIBUTION: E3S97I9K4Q2UXB
PATHS: "/*"

- name: Send Email on Success
if: success()
run: |
curl -X "POST" \
'https://api.sendgrid.com/v3/mail/send' \
-H 'Authorization:Bearer ${{ secrets.SENDGRID_API_KEY }}' \
-H 'Content-Type:application/json' \
-d '{
"personalizations":[
{
"to":[
{"email":"${{ vars.SENDGRID_TO_EMAIL }}"},
{"email":"${{ vars.SUPPORT_EMAIL}}"}
]
}
],
"from":{"email":"${{ vars.SENDGRID_FROM_EMAIL }}"},
"subject":"Footlight CMS Deployment",
"content":[
{
"type":"text/html",
"value":"${{ vars.NEW_RELEASE_HTML_PAGE }}"
}
]
}'

release-notification:
if: success()
name: Send Email on Success
needs: build-and-deploy
runs-on: ubuntu-latest
strategy:
matrix:
to-emails:
- ${{ vars.SENDGRID_TO_EMAIL }}
- ${{ vars.SUPPORT_EMAIL}}

steps:
- uses: licenseware/send-email-notification@v1
with:
api-key: ${{ secrets.SENDGRID_API_KEY }}
subject: Footlight CMS Deployment
from-email: ${{ vars.SENDGRID_FROM_EMAIL }}
to-email: ${{ matrix.to-emails }}
markdown-body: |
# Footlight CMS Update
## New Release Announcement
We are excited to announce that we have just released a new version of Footlight CMS!
The latest release can be found [here](https://github.com/culturecreates/footlight-app/releases/latest).
Best,
Footlight Admin

0 comments on commit 8d3731e

Please sign in to comment.