webapp/.gitea/workflows/main.yml
Untone 01370103e2
Some checks failed
deploy / test (push) Successful in 57s
deploy / quality (push) Failing after 11s
deploy / Run end-to-end tests (push) Failing after 1m30s
deploy / Update templates on Mailgun (push) Has been skipped
deploy / push (push) Failing after 2s
nogithub-token
2024-02-04 13:05:43 +03:00

99 lines
2.8 KiB
YAML

name: "deploy"
on:
push:
branches:
- main
- dev
- feature/email-templates
- feature/biome
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci
- name: Run check
run: npm run check
- name: Run check types
run: npm run typecheck
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install Biome
run: npm install --global --save-exact @biomejs/biome
- name: Run Biome
run: npx biome ci .
tests_e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci
- name: Install playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright Test
run: npx playwright test/discoursio-webapp.check.js
push:
needs: test_with_playwright
runs-on: ubuntu-latest
steps:
- name: Push changes
uses: ad-m/github-push-action@master
update_mailgun_template:
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:
- name: Checkout
uses: actions/checkout@v2
- name: "Email confirmation template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/authorizer_email_confirmation.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "authorizer_email_confirmation"
- name: "Password reset template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/authorizer_password_reset.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "authorizer_password_reset"
- name: "First publication notification"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/first_publication_notification.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "first_publication_notification"
- name: "New comment notification template"
uses: gyto/mailgun-template-action@v2
with:
html-file: "./templates/new_comment_notification.html"
mailgun-api-key: ${{ secrets.MAILGUN_API_KEY }}
mailgun-domain: "discours.io"
mailgun-template: "new_comment_notification"