Weekly Dashboard Build #38
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: Weekly Dashboard Build | |
| on: | |
| workflow_run: | |
| workflows: ["Weekly Full API Dump"] | |
| types: [completed] | |
| schedule: | |
| - cron: "0 6 * * 2" # Tuesday 06:00 UTC fallback (dump runs Monday 03:00) | |
| workflow_dispatch: | |
| jobs: | |
| build-dashboard: | |
| runs-on: ubuntu-latest | |
| # For workflow_run trigger: only proceed if the dump succeeded | |
| if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install local package | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Create output directories | |
| run: | | |
| mkdir -p data/processed | |
| mkdir -p dashboard_output | |
| - name: Expand properties | |
| run: python scripts/process_props.py | |
| - name: Check metadata completeness | |
| run: python scripts/check_recommended_Md.py | |
| - name: Build metadata dashboard | |
| run: python scripts/visualize_data.py | |
| - name: Build relations graph data | |
| run: python scripts/build_graph_data.py | |
| - name: Commit dashboards | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git pull --no-rebase https://x-access-token:${{ secrets.ACTIONS_PAT }}@github.com/mkrzmr/sshompitor.git main | |
| git add dashboard_output/ data/processed/full_items_MDcheck_*.json graph.json | |
| git commit -m "Weekly dashboard update $(date -u)" || echo "No changes" | |
| git push https://x-access-token:${{ secrets.ACTIONS_PAT }}@github.com/mkrzmr/sshompitor.git main |