name: Sync Docs to Developer Hub on: push: branches: [main] paths: - "docs/**" workflow_dispatch: jobs: sync-docs: runs-on: ubuntu-latest steps: - name: Checkout source repo uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b - name: Install Rust nightly uses: dtolnay/rust-toolchain@nightly - name: Install rustdoc-md run: cargo install rustdoc-md - name: Checkout docs repo uses: actions/checkout@v4 with: repository: run-llama/developers token: ${{ secrets.DEVELOPER_HUB_TOKEN }} path: developer-hub - name: Generate API docs run: ./scripts/generate-api-docs.sh - name: Sync docs run: ./scripts/sync-docs-to-developer-hub.sh developer-hub - name: Commit and push working-directory: developer-hub run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add src/content/docs/liteparse if git diff --staged --quiet; then echo "No docs changes to sync." exit 0 fi SOURCE_SHA="${GITHUB_SHA::8}" git commit -m "sync: liteparse docs from run-llama/liteparse@${SOURCE_SHA}" git push