skills/web-dev/web-deploy/SKILL.md
Deployment: Cloudflare Pages/Workers, Vercel, Netlify, Docker, GitHub Actions CI/CD
npx skillsauth add alphaonedev/openclaw-graph web-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill automates deployment of web applications to platforms like Cloudflare Pages/Workers, Vercel, Netlify, Docker, and GitHub Actions CI/CD pipelines. It focuses on streamlining the process from code commit to live deployment, handling configurations, builds, and environment integrations.
Use this skill for deploying static sites, serverless functions, or containerized apps. Apply it when setting up CI/CD for frequent updates, migrating projects to cloud platforms, or automating deployments in response to GitHub events. Ideal for web-dev workflows involving version control and cloud services.
Follow these patterns to integrate deployments into your workflow:
vercel.json for Vercel).$CLOUDFLARE_API_TOKEN for authentication.npx vercel in project root, select options, and push changes..github/workflows/deploy.yml file with steps to build Docker image and deploy to Netlify via API call.Use these exact commands and APIs for tasks:
npx wrangler pages deploy ./build --project-name=my-site to deploy a build folder; API endpoint: POST https://api.cloudflare.com/client/v4/accounts/{account_id}/pages/projects/{project_name}/deployments with JSON body {"files": [...]}, auth via $CLOUDFLARE_API_TOKEN.npx vercel deploy --prod from project directory; config in vercel.json: {"version": 2, "builds": [{"src": "package.json", "use": "@vercel/node"}]}, auth with $VERCEL_TOKEN.netlify deploy --dir=build --prod; API: POST https://api.netlify.com/api/v1/sites/{site_id}/deploys with form data, using $NETLIFY_ACCESS_TOKEN.docker build -t my-app:latest .; Push to registry: docker push my-repo/my-app:latest.run: echo "::set-env name=GITHUB_TOKEN::${{ secrets.GITHUB_TOKEN }}" then run: gh workflow run deploy.yml; Example snippet:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker build . -t my-app
on: [push, pull_request] in .github/workflows/main.yml.Integrate by setting environment variables in your CI/CD config, e.g., add env: { API_KEY: ${{ secrets.SERVICE_API_KEY }} } in GitHub Actions. For multi-platform setups, use a monorepo with separate configs (e.g., netlify.toml and vercel.json). Link with GitHub by adding webhooks: POST to https://api.github.com/repos/{owner}/{repo}/hooks with JSON payload. Ensure Docker images are tagged correctly for deployments, like docker tag my-app:latest registry.example.com/my-app:1.0. For API integrations, handle rate limits by checking response headers like X-RateLimit-Remaining.
Handle errors by checking exit codes and logs; for CLI commands, use try-catch in scripts (e.g., in Bash: if ! npx vercel deploy; then echo "Deployment failed"; exit 1; fi). Common issues: Authentication failures—verify env vars like $CLOUDFLARE_API_TOKEN is set; resolve with export CLOUDFLARE_API_TOKEN=your_key. For API errors, parse responses (e.g., if status code is 429, wait and retry). In GitHub Actions, use continue-on-error: true for non-critical steps, then check outputs. Example snippet for error logging:
try {
await fetch('https://api.cloudflare.com/...', { headers: { Authorization: `Bearer ${process.env.CLOUDFLARE_API_TOKEN}` } });
} catch (error) {
console.error('API error:', error.message);
}
Debug deployments by enabling verbose modes, like npx vercel deploy --debug.
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui