-
Notifications
You must be signed in to change notification settings - Fork 1
CI CD Integration
Griffen Fargo edited this page May 4, 2026
·
6 revisions
Vercel Doorman is designed for automated deployment pipelines. This guide covers integrating Doorman into your CI/CD workflow.
name: Firewall Deploy
on:
push:
branches: [main]
paths:
- 'vercel-firewall.config.json'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g vercel-doorman
- name: Validate configuration
run: vercel-doorman validate
- name: Deploy firewall rules
run: vercel-doorman sync
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }}name: Firewall PR Check
on:
pull_request:
paths:
- 'vercel-firewall.config.json'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g vercel-doorman
- name: Validate configuration
run: vercel-doorman validate --verbose
- name: Show diff
run: vercel-doorman diff --format json
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }}name: Multi-Provider Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g vercel-doorman
- name: Validate all configs
run: |
vercel-doorman validate --config vercel.config.json
vercel-doorman validate --config cloudflare.config.json
- name: Deploy to Vercel
run: vercel-doorman sync --config vercel.config.json --provider vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Deploy to Cloudflare
run: vercel-doorman sync --config cloudflare.config.json --provider cloudflare
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}Never commit API tokens. Use your CI provider's secrets management:
- GitHub Actions — Repository secrets or environment secrets
- Vercel — Environment variables in project settings
- GitLab CI — CI/CD variables
Always validate your configuration before deploying:
vercel-doorman validate --strictThe --strict flag catches warnings that might indicate issues.
Use --dry-run in pull request checks to preview changes without applying them:
vercel-doorman download --dry-run
vercel-doorman diff --format jsonCreate a backup before applying changes in production:
vercel-doorman backup --name "pre-deploy-$(date +%Y%m%d)"
vercel-doorman sync- Commands Overview — CLI command reference
- Configuration — Configuration file reference
- Getting Started — Quick setup guide
Getting Started
Configuration
Commands
Guides