This action uploads email templates from within a Github repo to Amazon SES.
Required A path to a directory where your email templates are stored, e.g.:
${{ github.workspace }}/templates/
Required A Sovy Github Sync Token generated inside the https://sovy.app dashboard.
Keep all your email templates in separate files, in a single directory, e.g. /templates
.
Each template file should contain a single email subject defined like this:
<!-- subject: Here put your email subject -->
- Listing all files from the provided directory
templates_dir
. - Reading contents of all found files.
- Parsing files' contents looking for the HTML comment containing a subject.
- Syncing all templates with Amazon SES through Sovy using provided
token
.
If a template with a specific name does not exist in your Amazon SES account, a new template will be created.
If a template with a specific name already exists, it will be updated.
If a template that was uploaded through this Github Action before (created or updated) is now missing, it will be deleted from the Amazon SES as well. You can disable this behavior by setting parameter clear_missing
to no
.
If you already have templates in your Amazon SES account and there are no templates with corresponding names inside your Github repo, those templates will stay untouched.
steps:
- name: Checking out the repo
uses: actions/checkout@v2
- name: Syncing email templates
uses: sovy-app/amazon-ses-sync-action@v1.2
with:
templates_dir: ${{ github.workspace }}/templates/
token: 60e77e49-8625-4b97-81ac-d573b6edbd36
clear_missing: yes