Skip to content

Add Alibaba Cloud (Model Studio / DashScope) LLM provider (#4738) #203

Add Alibaba Cloud (Model Studio / DashScope) LLM provider (#4738)

Add Alibaba Cloud (Model Studio / DashScope) LLM provider (#4738) #203

Workflow file for this run

name: Marketing CI/CD
# Quality gate + deploy for the marketing site (Next.js, deployed via
# @opennextjs/cloudflare to Cloudflare Workers). The marketing package has its
# own lockfile and is installed independently of the root workspace, so this runs
# in marketing/ directly.
#
# Deployment is driven from here (the `deploy` job) rather than Cloudflare's git
# integration: a push to main only ships after typecheck/lint/build and the
# Playwright smoke tests pass, which makes releases predictable instead of
# firing on every push regardless of state. Disconnect the repo from Cloudflare
# Workers Builds / Pages git integration so the site is only deployed from here.
#
# Required secrets (repo or `marketing-production` environment):
# CLOUDFLARE_API_TOKEN — token with "Edit Cloudflare Workers" + Workers R2
# Storage permissions for the account below
# CLOUDFLARE_ACCOUNT_ID — the Cloudflare account that owns the Worker
on:
push:
branches:
- main
paths:
- "marketing/**"
- ".github/workflows/marketing-ci.yml"
pull_request:
paths:
- "marketing/**"
- ".github/workflows/marketing-ci.yml"
# Least-privilege token: this workflow only reads the repo to build/lint/deploy
# (the Cloudflare deploy authenticates with its own API token, not GITHUB_TOKEN).
permissions:
contents: read
jobs:
build:
name: Typecheck, lint & build
runs-on: ubuntu-latest
defaults:
run:
working-directory: marketing
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: marketing/package-lock.json
- name: Install dependencies
run: npm ci
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: marketing/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('marketing/package-lock.json') }}-${{ hashFiles('marketing/src/**', 'marketing/next.config.mjs') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('marketing/package-lock.json') }}-
- name: Check generated template entries are up to date
run: |
npm run gen:templates
if ! git diff --quiet -- src/data/templateEntries.generated.ts public/templates; then
echo "::error::templateEntries.generated.ts / public/templates is stale. Run 'npm run gen:templates' in marketing/ and commit the result."
git diff --stat -- src/data/templateEntries.generated.ts public/templates
exit 1
fi
- name: Check generated provider catalog is up to date
run: npm run seo:provider-catalog -- --check
- name: Check generated agent discovery files are up to date
run: npm run seo:check
- name: Type check
run: npx tsc --noEmit
- name: Lint
run: npm run lint
- name: Build (Next.js)
run: npx next build
e2e:
name: Playwright smoke tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: marketing
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: marketing/package-lock.json
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Run smoke tests
run: npm run test:e2e
- name: Upload Playwright report on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: marketing-playwright-report
path: marketing/playwright-report
retention-days: 7
lighthouse:
name: Lighthouse budget (informational)
runs-on: ubuntu-latest
# Performance numbers vary on shared runners; never block the PR on them.
continue-on-error: true
defaults:
run:
working-directory: marketing
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: marketing/package-lock.json
- name: Install dependencies
run: npm ci
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: marketing/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('marketing/package-lock.json') }}-${{ hashFiles('marketing/src/**', 'marketing/next.config.mjs') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('marketing/package-lock.json') }}-
- name: Build (Next.js)
run: npx next build
- name: Run Lighthouse CI
run: npx --yes @lhci/cli@0.14.x autorun
deploy:
name: Deploy to Cloudflare
# Only ship from pushes to main, and only once the quality gates are green —
# this is the reliability win over the fire-on-every-push git integration.
needs: [build, e2e]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: marketing-production
url: https://nodetool.ai
# Never run two deploys at once; let an in-flight one finish rather than
# cancelling it mid-upload.
concurrency:
group: marketing-deploy
cancel-in-progress: false
defaults:
run:
working-directory: marketing
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: marketing/package-lock.json
- name: Install dependencies
run: npm ci
# Restore the incremental build cache so `next build` (run inside
# `opennextjs-cloudflare build`) doesn't recompile from scratch on every
# deploy — this is the "No build cache found" warning in the deploy log.
# The `build` job runs first on the same commit and saves under the same
# key, so this is usually an exact hit.
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: marketing/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('marketing/package-lock.json') }}-${{ hashFiles('marketing/src/**', 'marketing/next.config.mjs') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('marketing/package-lock.json') }}-
- name: Build & deploy (OpenNext → Cloudflare Workers)
run: npm run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}