webapp/.gitea/workflows/main.yml
Untone 5e2cec5b5d
Some checks failed
deploy / test (push) Has been skipped
deploy / Update templates on Mailgun (push) Failing after 12s
ci-fix-3
2024-02-08 02:23:18 +03:00

78 lines
2.3 KiB
YAML

name: "deploy"
on: [push]
jobs:
test:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/feature/email-templates'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Install Biome
run: npm install --global --save-exact @biomejs/biome
- name: Lint with Biome
run: npx biome ci .
- name: Lint styles
run: npm run lint:styles
- name: Check types
run: npm run typecheck
- name: Test production build
run: npm run build
email-templates:
runs-on: ubuntu-latest
name: Update templates on Mailgun
if: github.event_name == 'push' && github.ref == 'refs/heads/feature/email-templates'
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run templates build
run: npm run templates
- name: "authorizer_email_confirmation template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/dist/authorizer_email_confirmation.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "authorizer_email_confirmation"
- name: "authorizer_password_reset template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/dist/authorizer_password_reset.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "authorizer_password_reset"
- name: "email_first_publication template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/dist/authorizer_first_publication.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "email_first_publication"
- name: "new_comment_notification template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/dist/authorizer_new_comment.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "new_comment_notification"