Skip to content

Add recipe: BYO Vector Store — LlamaCloud Index V2 to Azure AI Search #217

Add recipe: BYO Vector Store — LlamaCloud Index V2 to Azure AI Search

Add recipe: BYO Vector Store — LlamaCloud Index V2 to Azure AI Search #217

Workflow file for this run

name: Preview PR
# Unprivileged build/validate/test job. Runs on the `pull_request` event so it works
# identically for fork and same-repo PRs — but GitHub always issues a read-only
# GITHUB_TOKEN for fork-based pull_request runs, so this workflow never attempts to
# push anywhere. It hands its build output off as an artifact; the actual gh-pages
# deploy (which needs write access) happens in the separate preview-deploy.yml
# workflow, triggered via workflow_run once this one completes. See preview-deploy.yml
# for why the split exists and how the deploy is gated.
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
concurrency:
group: "preview-pr-${{ github.event.pull_request.number }}"
cancel-in-progress: true
jobs:
# --- Build, validate, and test; hand off to preview-deploy.yml via artifact ---
build-and-preview:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install site dependencies
working-directory: ./site
run: npm ci
- name: Install script dependencies
working-directory: ./scripts
run: npm ci
- name: Validate registry
working-directory: ./scripts
run: npx tsx validate-registry.ts
- name: Build site for preview
working-directory: ./site
env:
ASTRO_BASE: /forgebook/preview/pr-${{ github.event.pull_request.number }}
run: npm run build
- name: Install Playwright browser
working-directory: ./site
run: npx playwright install --with-deps chromium
- name: Run accessibility checks
working-directory: ./site
env:
ASTRO_BASE: /forgebook/preview/pr-${{ github.event.pull_request.number }}
PLAYWRIGHT_BASE_URL: http://localhost:4321/forgebook/preview/pr-${{ github.event.pull_request.number }}
FORGEBOOK_TEST_BASE_PATH: /forgebook/preview/pr-${{ github.event.pull_request.number }}
run: npm run test:a11y
# workflow_run doesn't expose github.event.pull_request for fork-based PRs
# (GitHub leaves `pull_requests` empty in that case), so pass what
# preview-deploy.yml needs along explicitly via an artifact.
- name: Save PR metadata for preview-deploy workflow
run: |
mkdir -p ./pr-meta
cat <<EOF > ./pr-meta/metadata.json
{
"prNumber": ${{ github.event.pull_request.number }},
"headSha": "${{ github.event.pull_request.head.sha }}"
}
EOF
- name: Upload PR metadata
uses: actions/upload-artifact@v4
with:
name: pr-metadata
path: ./pr-meta/metadata.json
retention-days: 1
- name: Upload built site
uses: actions/upload-artifact@v4
with:
name: preview-dist
path: ./site/dist
retention-days: 1