Skip to content

Deploy from GitHub

Set up automatic deployments from GitHub so your site updates every time you push code. This guide uses GitHub Actions with the official Quant deploy action.

From the Quant Dashboard:

  1. Note your Organisation ID (shown in the dashboard URL after /org/)
  2. Select your project and go to Integrations
  3. Copy your Project Token

You’ll need:

  • QUANT_CUSTOMER — Your organisation ID
  • QUANT_PROJECT — Your project machine name
  • QUANT_TOKEN — Your project token
  1. Go to your GitHub repository
  2. Click SettingsSecrets and variablesActions
  3. Click New repository secret and add each:
NameValue
QUANT_CUSTOMERYour organisation ID
QUANT_PROJECTYour project name
QUANT_TOKENYour project token

Create .github/workflows/deploy.yml in your repository:

name: Deploy to Quant
on:
push:
branches:
- main # or master, depending on your default branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Deploy to Quant
uses: quantcdn/deploy-action@v6
with:
customer: ${{ secrets.QUANT_CUSTOMER }}
project: ${{ secrets.QUANT_PROJECT }}
token: ${{ secrets.QUANT_TOKEN }}
dir: dist # Change to your build output directory
skip-purge: true
- name: Purge CDN cache
uses: quantcdn/purge-action@v6
with:
customer: ${{ secrets.QUANT_CUSTOMER }}
project: ${{ secrets.QUANT_PROJECT }}
token: ${{ secrets.QUANT_TOKEN }}
url_pattern: "/*"

Commit and push the workflow file:

Terminal window
git add .github/workflows/deploy.yml
git commit -m "Add Quant deployment workflow"
git push

Go to Actions in your GitHub repository to watch the deployment run.

Add caching to skip unchanged files. The revision log stores md5 hashes of deployed assets, so subsequent deploys only upload what changed.

name: Deploy to Quant
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore revision log
uses: actions/cache@v5
with:
path: .quant-revision
key: quant-revision-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
quant-revision-${{ github.ref }}-
- name: Build site
run: npm run build
- name: Deploy to Quant
uses: quantcdn/deploy-action@v6
with:
customer: ${{ secrets.QUANT_CUSTOMER }}
project: ${{ secrets.QUANT_PROJECT }}
token: ${{ secrets.QUANT_TOKEN }}
dir: dist
revision-log: .quant-revision
skip-purge: true
- name: Purge CDN cache
uses: quantcdn/purge-action@v6
with:
customer: ${{ secrets.QUANT_CUSTOMER }}
project: ${{ secrets.QUANT_PROJECT }}
token: ${{ secrets.QUANT_TOKEN }}
url_pattern: "/*"

Deploy main to production and develop to staging:

name: Deploy to Quant
on:
push:
branches:
- main
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set environment
run: |
if [[ $GITHUB_REF == 'refs/heads/main' ]]; then
echo "QUANT_PROJECT=${{ secrets.QUANT_PROJECT_PROD }}" >> $GITHUB_ENV
echo "QUANT_TOKEN=${{ secrets.QUANT_TOKEN_PROD }}" >> $GITHUB_ENV
else
echo "QUANT_PROJECT=${{ secrets.QUANT_PROJECT_STAGING }}" >> $GITHUB_ENV
echo "QUANT_TOKEN=${{ secrets.QUANT_TOKEN_STAGING }}" >> $GITHUB_ENV
fi
- name: Install and build
run: |
npm ci
npm run build
- name: Deploy to Quant
uses: quantcdn/deploy-action@v6
with:
customer: ${{ secrets.QUANT_CUSTOMER }}
project: ${{ env.QUANT_PROJECT }}
token: ${{ env.QUANT_TOKEN }}
dir: dist
skip-purge: true
- name: Purge CDN cache
uses: quantcdn/purge-action@v6
with:
customer: ${{ secrets.QUANT_CUSTOMER }}
project: ${{ env.QUANT_PROJECT }}
token: ${{ env.QUANT_TOKEN }}
url_pattern: "/*"

Add additional secrets for each environment:

  • QUANT_PROJECT_PROD / QUANT_TOKEN_PROD
  • QUANT_PROJECT_STAGING / QUANT_TOKEN_STAGING
OptionDescription
customerOrganisation ID (required)
projectProject name (required)
tokenProject token (required)
dirBuild output directory (required)
revision-logPath for revision tracking file
skip-purgeSkip automatic cache purge (recommended)
chunk-sizeConcurrent uploads (default: 10, max: 20)

Deployment succeeds but site doesn’t update

Section titled “Deployment succeeds but site doesn’t update”

Check that the cache was purged. If using skip-purge: true, ensure the purge action runs after deploy.

Verify your secrets are correct:

  1. Check for extra whitespace when copying tokens
  2. Ensure the token has deploy permissions for the project
  3. Confirm the organisation ID and project name match

The build step is separate from Quant deployment. Check:

  • Node.js version matches your local environment
  • All dependencies are in package.json
  • Build command is correct for your framework