mailgun-temaplates
Some checks failed
deploy / test (push) Failing after 1m5s
deploy / Update 'main' template on Mailgun (push) Failing after 4s

This commit is contained in:
Untone 2024-01-05 21:26:15 +03:00
parent 6a1d612a27
commit 451496a29c
3 changed files with 706 additions and 24 deletions

View File

@ -22,3 +22,27 @@ jobs:
- name: Run tests - name: Run tests
run: npm run check run: npm run check
update_mailgun_template:
runs-on: ubuntu-latest
name: Update 'main' template on Mailgun
steps:
- name: Checkout
uses: actions/checkout@v2
- name: update authorizer_password_reset
uses: jlepocher/mailgun-create-template-version-action@v1.3
with:
mailgun-host: 'api.eu.mailgun.net'
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain-name: 'discours.io'
mailgun-template-name: 'authorizer_password_reset'
html-file-path: './templates/authorizer_password_reset.html'
- name: update authorizer_password_reset
uses: jlepocher/mailgun-create-template-version-action@v1.3
with:
mailgun-host: 'api.eu.mailgun.net'
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain-name: 'discours.io'
mailgun-template-name: 'authorizer_email_confirm'
html-file-path: './templates/authorizer_email_confirm.html'

View File

@ -0,0 +1,204 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Дискурс: подтверждение почты</title>
<style type="text/css">
img {
max-width: 100%;
}
body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100% !important;
height: 100%;
line-height: 1.6em;
}
body {
background-color: #f6f6f6;
}
body,
div,
td,
tr,
table {
margin: 0;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
box-sizing: border-box;
font-size: 14px;
}
@media only screen and (max-width: 640px) {
body {
padding: 0 !important;
}
h1 {
font-weight: 800 !important;
margin: 20px 0 5px !important;
}
h2 {
font-weight: 800 !important;
margin: 20px 0 5px !important;
}
h3 {
font-weight: 800 !important;
margin: 20px 0 5px !important;
}
h4 {
font-weight: 800 !important;
margin: 20px 0 5px !important;
}
h1 {
font-size: 22px !important;
}
h2 {
font-size: 18px !important;
}
h3 {
font-size: 16px !important;
}
.container {
padding: 0 !important;
width: 100% !important;
}
.content {
padding: 0 !important;
}
.content-wrap {
padding: 10px !important;
}
.invoice {
width: 100% !important;
}
}
</style>
</head>
<body
itemscope
itemtype="http://schema.org/EmailMessage"
style="
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100% !important;
height: 100%;
line-height: 1.6em;
"
bgcolor="#f6f6f6"
>
<table class="body-wrap" style="width: 100%">
<tr style="vertical-align: top">
<td valign="top"></td>
<td
class="container"
width="600"
style="
font-size: 14px;
display: block !important;
max-width: 600px !important;
clear: both !important;
margin: 0 auto;
"
valign="top"
>
<div class="content" style="max-width: 600px; display: block; margin: 0 auto; padding: 20px">
<img src="https://testing.discours.io/logo.png" />
<table
class="main"
width="100%"
cellpadding="0"
cellspacing="0"
itemprop="action"
itemscope
itemtype="http://schema.org/ConfirmAction"
style="border-radius: 3px; border: 1px solid #000"
bgcolor="#fff"
>
<tr>
<td class="content-wrap" style="vertical-align: top; padding: 20px" valign="top">
<meta itemprop="name" content="Подтвердите почту" />
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="content-block" style="vertical-align: top; padding: 0 0 20px" valign="top">
Приветствуем! Пожалуйста, подтвердите почту, нажав на ссылку ниже.
</td>
</tr>
<tr>
<td class="content-block" style="vertical-align: top; padding: 0 0 20px" valign="top">
Мы будем оповещать вас о важных вещах.
</td>
</tr>
<tr>
<td
class="content-block"
itemprop="handler"
itemscope
itemtype="http://schema.org/HttpActionHandler"
style="vertical-align: top; padding: 0 0 20px"
valign="top"
>
<a
href="{{verification_url}}"
class="btn-primary"
itemprop="url"
style="
color: #fff;
text-decoration: none;
line-height: 2em;
font-weight: bold;
text-align: center;
cursor: pointer;
display: inline-block;
border-radius: 5px;
text-transform: capitalize;
background-color: #000;
padding: 1em;
"
>
Подтвердить
</a>
</td>
</tr>
<tr>
<td class="content-block" style="vertical-align: top; padding: 0 0 20px" valign="top">
&mdash; Дискурс
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="footer" style="width: 100%; clear: both; color: #999; padding: 20px">
<table width="100%">
<tr>
<td
class="aligncenter content-block"
style="
font-size: 12px;
vertical-align: top;
color: #999;
text-align: center;
padding: 0 0 20px;
"
align="center"
valign="top"
>
Подписаться
<a
href="http://t.me/discoursio"
style="font-size: 12px; color: #999; text-decoration: underline; margin: 0"
>
@discoursio
</a>
в телеграмм.
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,454 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
>
<head>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG />
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<title>Дискурс: сброс пароля</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0 " />
<meta name="format-detection" content="telephone=no" />
<style type="text/css">
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100% !important;
-ms-text-size-adjust: 100% !important;
-webkit-font-smoothing: antialiased !important;
}
img {
border: 0 !important;
outline: none !important;
}
p {
margin: 0px !important;
padding: 0px !important;
}
table {
border-collapse: collapse;
mso-table-lspace: 0px;
mso-table-rspace: 0px;
}
td,
a,
span {
border-collapse: collapse;
mso-line-height-rule: exactly;
}
.ExternalClass * {
line-height: 100%;
}
.em_blue a {
text-decoration: none;
color: darkgrey;
}
.em_grey a {
text-decoration: none;
color: darkgrey;
}
.em_white a {
text-decoration: none;
color: #ffffff;
}
@media only screen and (min-width: 481px) and (max-width: 649px) {
.em_main_table {
width: 100% !important;
}
.em_wrapper {
width: 100% !important;
}
.em_hide {
display: none !important;
}
.em_aside10 {
padding: 0px 10px !important;
}
.em_h20 {
height: 20px !important;
font-size: 1px !important;
line-height: 1px !important;
}
.em_h10 {
height: 10px !important;
font-size: 1px !important;
line-height: 1px !important;
}
.em_aside5 {
padding: 0px 10px !important;
}
.em_ptop2 {
padding-top: 8px !important;
}
}
@media only screen and (min-width: 375px) and (max-width: 480px) {
.em_main_table {
width: 100% !important;
}
.em_wrapper {
width: 100% !important;
}
.em_hide {
display: none !important;
}
.em_aside10 {
padding: 0px 10px !important;
}
.em_aside5 {
padding: 0px 8px !important;
}
.em_h20 {
height: 20px !important;
font-size: 1px !important;
line-height: 1px !important;
}
.em_h10 {
height: 10px !important;
font-size: 1px !important;
line-height: 1px !important;
}
.em_font_11 {
font-size: 12px !important;
}
.em_font_22 {
font-size: 22px !important;
line-height: 25px !important;
}
.em_w5 {
width: 7px !important;
}
.em_w150 {
width: 150px !important;
height: auto !important;
}
.em_ptop2 {
padding-top: 8px !important;
}
u + .em_body .em_full_wrap {
width: 100% !important;
width: 100vw !important;
}
}
@media only screen and (max-width: 374px) {
.em_main_table {
width: 100% !important;
}
.em_wrapper {
width: 100% !important;
}
.em_hide {
display: none !important;
}
.em_aside10 {
padding: 0px 10px !important;
}
.em_aside5 {
padding: 0px 8px !important;
}
.em_h20 {
height: 20px !important;
font-size: 1px !important;
line-height: 1px !important;
}
.em_h10 {
height: 10px !important;
font-size: 1px !important;
line-height: 1px !important;
}
.em_font_11 {
font-size: 11px !important;
}
.em_font_22 {
font-size: 22px !important;
line-height: 25px !important;
}
.em_w5 {
width: 5px !important;
}
.em_w150 {
width: 150px !important;
height: auto !important;
}
.em_ptop2 {
padding-top: 8px !important;
}
u + .em_body .em_full_wrap {
width: 100% !important;
width: 100vw !important;
}
}
</style>
</head>
<body class="em_body" style="margin: 0px auto; padding: 0px" bgcolor="#efefef">
<table
width="100%"
border="0"
cellspacing="0"
cellpadding="0"
class="em_full_wrap"
align="center"
bgcolor="#efefef"
>
<tr>
<td align="center" valign="top">
<table
align="center"
width="650"
border="0"
cellspacing="0"
cellpadding="0"
class="em_main_table"
style="width: 650px; table-layout: fixed"
>
<tr>
<td align="center" valign="top" style="padding: 0 25px" class="em_aside10">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="25" style="height: 25px" class="em_h20">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top">
<a href="#" target="_blank" style="text-decoration: none">
<img
src="https://testing.discours.io/logo.png"
width="208"
height="41"
alt="ДИСКУРС"
border="0"
style="
display: block;
font-family: Arial, sans-serif;
font-size: 18px;
line-height: 25px;
text-align: center;
font-weight: bold;
max-width: 208px;
"
class="em_w150"
/>
</a>
</td>
</tr>
<tr>
<td height="28" style="height: 28px" class="em_h20">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table
width="100%"
border="0"
cellspacing="0"
cellpadding="0"
class="em_full_wrap"
align="center"
bgcolor="#efefef"
>
<tr>
<td align="center" valign="top" class="em_aside5">
<table
align="center"
width="650"
border="0"
cellspacing="0"
cellpadding="0"
class="em_main_table"
style="width: 650px; table-layout: fixed"
>
<tr>
<td
align="center"
valign="top"
style="padding: 0 25px; background-color: #ffffff"
class="em_aside10"
>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="45" style="height: 45px" class="em_h20">&nbsp;</td>
</tr>
<tr>
<td
class="em_blue em_font_22"
align="center"
valign="top"
style="
font-family: Arial, sans-serif;
font-size: 26px;
line-height: 29px;
color: #264780;
font-weight: bold;
"
>
Сброс пароля
</td>
</tr>
<tr>
<td height="14" style="height: 14px; font-size: 0px; line-height: 0px">&nbsp;</td>
</tr>
<tr>
<td
class="em_grey"
align="center"
valign="top"
style="
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 26px;
color: #434343;
"
>
Нажмите на
<a href="{{verification_url}}">ссылку</a>
для сброса пароля
</td>
</tr>
<tr>
<td height="26" style="height: 26px" class="em_h20">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top">
<table
width="250"
style="width: 250px; border-radius: 4px"
border="0"
cellspacing="0"
cellpadding="0"
align="center"
>
<tr>
<td
class="em_white"
height="42"
align="center"
valign="middle"
style="
font-family: Arial, sans-serif;
font-size: 16px;
color: #ffffff;
font-weight: bold;
height: 42px;
"
>
<a
href="https://www.mailgun.com"
target="_blank"
style="
text-decoration: none;
color: #ffffff;
line-height: 42px;
display: block;
"
>
СБРОСИТЬ ПАРОЛЬ
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="25" style="height: 25px" class="em_h20">&nbsp;</td>
</tr>
<tr>
<td
class="em_grey"
align="center"
valign="top"
style="font-family: Arial, sans-serif; font-size: 16px; line-height: 26px"
>
Если вы не хотели сбрасывать пароль - просто проигнорируйте это сообщение.
</td>
</tr>
<tr>
<td height="44" style="height: 44px" class="em_h20">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table
width="100%"
border="0"
cellspacing="0"
cellpadding="0"
class="em_full_wrap"
align="center"
bgcolor="#efefef"
>
<tr>
<td align="center" valign="top">
<table
align="center"
width="650"
border="0"
cellspacing="0"
cellpadding="0"
class="em_main_table"
style="width: 650px; table-layout: fixed"
>
<tr>
<td align="center" valign="top" style="padding: 0 25px" class="em_aside10">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" valign="top" style="font-size: 0px; line-height: 0px">
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td
width="15"
align="left"
valign="middle"
style="font-size: 0px; line-height: 0px; width: 15px"
>
<a href="mailto:welcome@discours.io" style="text-decoration: none">
<img
src="/assets/pilot/images/templates/email_img.png"
width="15"
height="12"
alt=""
border="0"
style="display: block; max-width: 15px"
/>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="9" style="font-size: 0px; line-height: 0px; height: 9px" class="em_h10">
<img
src="/assets/pilot/images/templates/spacer.gif"
width="1"
height="1"
alt=""
border="0"
style="display: block"
/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>