name: Pulse
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
env:
REFLEX_AI_API_KEY: ${{ secrets.REFLEX_AI_API_KEY }}
REFLEX_PROVIDER: ${{ vars.REFLEX_PROVIDER }}
REFLEX_MODEL: ${{ vars.REFLEX_MODEL }}
jobs:
build:
runs-on: ubuntu-24.04
environment: github-pages
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- name: Cache Rust build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: pulse-rust-${{ hashFiles('Cargo.lock') }}
restore-keys: pulse-rust-
- name: Build release binary
run: cargo build --release
- name: Index codebase
run: ./target/release/rfx index
- name: Restore LLM cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 with:
path: .reflex/pulse/llm-cache
key: pulse-llm-cache-${{ github.sha }}
restore-keys: pulse-llm-cache-
- name: Generate Pulse site
run: ./target/release/rfx pulse generate --base-url "https://pulse.rfx-search.dev" --title "Reflex" --concurrency 4
- name: Save LLM cache
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 with:
path: .reflex/pulse/llm-cache
key: pulse-llm-cache-${{ github.sha }}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa with:
path: pulse-site/public
deploy:
needs: build
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e