Run performance metrics extraction of newsletters #37
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: Run performance metrics extraction of newsletters | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # run every second day at 14:00 | |
| - cron: "0 14 */2 * *" | |
| jobs: | |
| newsletter-statistics: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the code from the repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Get environment ready | |
| - name: Create pixi environment | |
| uses: prefix-dev/setup-pixi@v0.8.3 | |
| env: | |
| RUNNER_DEBUG: true | |
| with: | |
| pixi-version: v0.42.1 | |
| cache: true | |
| locked: false | |
| - name: Run newsletter statistics aggregation | |
| env: | |
| BREVO_API_KEY: ${{ secrets.BREVO_API_KEY }} | |
| run: | | |
| pixi run python ./src/performance_testing/newsletter.py \ | |
| ./brevo-stats.csv | |
| - name: Store csv as gist | |
| env: | |
| GIST_ID: ${{ secrets.BREVO_GIST_ID }} | |
| run: | | |
| pixi run python src/performance_testing/csv2gist.py \ | |
| ./brevo-stats.csv $GIST_ID --token ${{ secrets.BREVO_GIST_TOKEN }} |