A GitHub Action send email via Resend.
Note: You can't specify a "from" domain. It just uses the generic Resend domain (i.e.
@resend.dev).
.github/workflows/bot.yaml
name: Bot
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
healthcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check production endpoint
uses: jtalk/url-health-check-action@v3
with:
url: https://example.com
max-attempts: 3
retry-delay: 5s
follow-redirect: true
- name: Send email via Resend
if: failure()
uses: taadis/resend-action@main
with:
apikey: ${{ secrets.RESEND_API_KEY }}
from: ${{ secrets.FROM_MAIL }}
to: ${{ secrets.TO_MAIL_ADDRESS }}
subject: Health Check Failed
text: The production site at https://example.com is not responding correctly