feat: add mjml authoring support. #110
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| concurrency: ci-${{ github.ref }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| actions: write | |
| contents: write | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| # python ---- | |
| - uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Install emailer-lib | |
| run: uv pip install -e . | |
| # quarto docs build ---- | |
| - uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| tinytex: true | |
| - name: Build docs | |
| run: | | |
| uv run quartodoc build --verbose && uv run quarto render | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| with: | |
| force: false | |
| folder: _site | |
| clean-exclude: pr-preview | |
| - name: Deploy (preview) | |
| uses: rossjrw/pr-preview-action@v1 | |
| # if in a PR | |
| if: ${{ github.event_name == 'pull_request' }} | |
| with: | |
| source-dir: _site | |
| test-emailer-lib: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.12"] | |
| fail-fast: false | |
| permissions: | |
| pull-requests: write | |
| actions: write | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Install emailer-lib | |
| run: uv pip install -e . | |
| - name: Install the project deps | |
| run: uv pip install -e .[dev] | |
| - name: Test emailer-lib | |
| run: | | |
| uv run pytest emailer_lib/tests/ --cov=emailer_lib --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v4 | |
| if: ${{ matrix.python-version == '3.12' }} | |
| with: | |
| file: emailer-lib/coverage.xml | |
| flags: emailer-lib |