GitHub Action
GitHub Action
Fail PRs when HTML email templates have rendering issues across email clients.
The Emailens GitHub Action checks your HTML email templates against 10+ email clients and fails the build if compatibility scores drop below a threshold.
What it does
- Finds email HTML files matching a glob pattern
- Sends each file to the Emailens API for analysis
- Checks per-client compatibility scores against your threshold
- Reports results as GitHub annotations and a job summary
- Fails the workflow if any file is below threshold
Quick start
# .github/workflows/email-check.yml
name: Email Preview Check
on: [pull_request]
jobs:
check-emails:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: emailens/action@v1
with:
pattern: "emails/**/*.html"
threshold: "70"See Setup for detailed configuration.