Biweekly Traffic collection #39
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: Biweekly Traffic collection | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 */14 * *" # Runs every 14 days at midnight UTC | |
| jobs: | |
| daily_traffic_collection: | |
| environment: traffic | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| activate-environment: true | |
| - name: Install dependencies | |
| run: | | |
| uv pip install . | |
| - name: Collect GitHub Traffic Data | |
| run: | | |
| uv run gitmetrics traffic \ | |
| --config-file traffic_config.yaml \ | |
| --token ${{ secrets.GH_TOKEN }} \ | |
| --output-folder ${{ secrets.OUTPUT_FOLDER }} | |
| env: | |
| PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }} | |
| alert: | |
| needs: [daily_traffic_collection] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: failure() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| activate-environment: true | |
| - name: Install dependencies | |
| run: | | |
| uv pip install .[dev] |