Skip to content

Replace GitHub Pages pipeline with Vercel CI/CD for dynamic Next.js deployment#2

Merged
AshenWijesingha merged 3 commits into
mainfrom
copilot/build-and-deploy-next-js-app
Mar 15, 2026
Merged

Replace GitHub Pages pipeline with Vercel CI/CD for dynamic Next.js deployment#2
AshenWijesingha merged 3 commits into
mainfrom
copilot/build-and-deploy-next-js-app

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 15, 2026

This app was configured to deploy via GitHub Pages static artifacts, but it uses dynamic App Router routes and API handlers. The PR realigns CI/CD with a server-capable deployment target (Vercel) and documents the required runtime configuration.

  • Deployment pipeline rewrite

    • Replaced the Pages-oriented workflow with a Next.js/Vercel pipeline in .github/workflows/nextjs.yml.
    • build job now runs install + lint + Next build on pushes/PRs.
    • deploy job runs only on main and deploys via Vercel CLI (pullbuild --proddeploy --prebuilt --prod).
  • Fail-fast secret validation

    • Added an explicit guard step in deploy to stop early with clear errors when required Vercel secrets are missing:
      • VERCEL_TOKEN
      • VERCEL_ORG_ID
      • VERCEL_PROJECT_ID
  • Docs updated for operational setup

    • README deployment section now reflects GitHub Actions + Vercel flow.
    • Clarified separation between GitHub repository secrets and Vercel project environment variables (NEXT_PUBLIC_BASE_URL).
deploy:
  if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
  steps:
    - name: Validate Vercel secrets
      run: |
        test -n "$VERCEL_TOKEN" || (echo "Missing required secret: VERCEL_TOKEN" && exit 1)
        test -n "$VERCEL_ORG_ID" || (echo "Missing required secret: VERCEL_ORG_ID" && exit 1)
        test -n "$VERCEL_PROJECT_ID" || (echo "Missing required secret: VERCEL_PROJECT_ID" && exit 1)

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 15, 2026 17:11
Co-authored-by: AshenWijesingha <66056859+AshenWijesingha@users.noreply.github.com>
Co-authored-by: AshenWijesingha <66056859+AshenWijesingha@users.noreply.github.com>
Copilot AI changed the title [WIP] Build and deploy Next.js application Replace GitHub Pages pipeline with Vercel CI/CD for dynamic Next.js deployment Mar 15, 2026
Copilot AI requested a review from AshenWijesingha March 15, 2026 17:15
@AshenWijesingha AshenWijesingha marked this pull request as ready for review March 15, 2026 17:21
@AshenWijesingha AshenWijesingha merged commit 09132e0 into main Mar 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants