Skip to content

Daily AI Framework Pages #19

Daily AI Framework Pages

Daily AI Framework Pages #19

name: Daily AI Framework Pages
on:
schedule:
# GitHub cron is UTC. 14:00 UTC is morning Pacific time:
# 06:00 PST during standard time and 07:00 PDT during daylight time.
- cron: "0 14 * * *"
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
concurrency:
group: ai-framework-pages
cancel-in-progress: false
jobs:
refresh-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install uv
run: python -m pip install uv
- name: Install dependencies
run: uv sync --extra dev
- name: Refresh data and build Pages artifact
env:
SEC_USER_AGENT: ${{ secrets.SEC_USER_AGENT }}
run: uv run python -m scripts.daily_ai_framework_refresh --include-sec
- name: Lint
run: uv run ruff check .
- name: Test
run: uv run pytest
- name: Persist portfolio history
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add data/portfolio/ai_portfolio_summary.csv data/portfolio/ai_portfolio_snapshots.csv
if git diff --cached --quiet; then
echo "No portfolio history changes to commit."
else
git commit -m "Update portfolio history [skip ci]"
git push
fi
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4