webapp/.gitea/workflows/main.yml
Untone e95558fb51
Some checks failed
deploy / Linting (push) Successful in 3m1s
deploy / Playwright (push) Failing after 2m22s
deploy / Update templates on Mailgun (push) Has been skipped
deploy / Github (push) Failing after 2s
e2e
2024-02-04 16:25:23 +03:00

107 lines
2.9 KiB
YAML

name: "deploy"
on: [push]
jobs:
Linting:
runs-on: ubuntu-latest
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
Playwright:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Start Web Server
run: npm start > server.log 2>&1 &
- name: Web Server startup log
run: sleep 10 && cat server.log
- name: Run Playwright tests
run: npm run e2e
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Github:
needs: test_with_playwright
runs-on: ubuntu-latest
steps:
- name: Push changes
uses: ad-m/github-push-action@master
Mailgun:
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"