Skip to content

Deploy site

Deploy site #106

Workflow file for this run

name: Deploy site
# Build site/ (Vite SPA) and publish it to GitHub Pages.
# Served at the apex custom domain agent-connector.ai (site/public/CNAME), so the
# build base is "/" (Vite default — no VITE_BASE). main.tsx reads the base for the
# router basename, so routing follows automatically. The ken-jo.github.io/agent-
# connector/ URL 301-redirects to the custom domain once DNS is live.
on:
push:
branches: [main]
paths:
- "site/**"
- "llms.txt"
- "llms-full.txt"
- "skills/agent-connector/**"
- ".github/workflows/deploy-site.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# One concurrent Pages deployment; don't cancel an in-flight publish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: |
package-lock.json
site/package-lock.json
- name: Install root generator dependencies
run: npm ci
working-directory: .
- run: npm ci
- name: Build
run: npm run build
- name: SPA fallback (deep-link refresh on Pages serves 404.html)
run: cp dist/index.html dist/404.html
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: site/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4