ci: pass NEXT_PUBLIC_* env vars inline in deploy step (no secrets nee… #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI / Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ── 1. Type-check & Build ───────────────────────────────────────────────── | |
| build: | |
| name: Type-check & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type-check | |
| run: npx tsc --noEmit | |
| - name: Build | |
| run: npm run build | |
| env: | |
| NEXT_PUBLIC_SITE_NAME: CloudForgeOps | |
| NEXT_PUBLIC_SITE_URL: https://cloudforgeops.com | |
| NEXT_PUBLIC_SITE_TAGLINE: "Freelance DevOps & Cloud Consulting" | |
| NEXT_PUBLIC_SITE_DESCRIPTION: "Production-grade cloud infrastructure, Kubernetes, and CI/CD — built by a senior DevOps engineer." | |
| NEXT_PUBLIC_SITE_OG_IMAGE: /og-image.png | |
| NEXT_PUBLIC_CONTACT_EMAIL: sagardeepak2002@gmail.com | |
| NEXT_PUBLIC_SOCIAL_GITHUB: https://github.com/sagarDeepakDevOps | |
| NEXT_PUBLIC_SOCIAL_LINKEDIN: https://linkedin.com/in/sagardeepak2002 | |
| NEXT_PUBLIC_OWNER_NAME: Deepak Sagar | |
| NEXT_PUBLIC_OWNER_TITLE: "Freelance DevOps & Cloud Engineer" | |
| NEXT_PUBLIC_OWNER_EXPERIENCE: "3+" | |
| NEXT_PUBLIC_OWNER_EXPERIENCE_LABEL: "years of production DevOps experience" | |
| NEXT_PUBLIC_OWNER_BIO: "Senior DevOps engineer specialising in AWS, Kubernetes, Terraform, and CI/CD automation." | |
| NEXT_PUBLIC_OWNER_LINKEDIN: https://linkedin.com/in/sagardeepak2002 | |
| NEXT_PUBLIC_FREE_REVIEW_HREF: /free-review | |
| NEXT_PUBLIC_FREE_REVIEW_DURATION: "20 min" | |
| NEXT_PUBLIC_CALENDLY_URL: https://calendly.com/sagardeepak2002/30min | |
| # ── 2. Deploy to Vercel (production — main branch only) ─────────────────── | |
| deploy: | |
| name: Deploy to Vercel (Production) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| # Only deploy on push to main, not on pull requests | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@v25 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| working-directory: ./ | |
| vercel-args: >- | |
| --prod | |
| --build-env NEXT_PUBLIC_SITE_NAME="CloudForgeOps" | |
| --build-env NEXT_PUBLIC_SITE_TAGLINE="Freelance DevOps & Cloud Engineering" | |
| --build-env NEXT_PUBLIC_SITE_DESCRIPTION="I design, build, and operate cloud-native infrastructure. From Kubernetes to CI/CD pipelines, I help startups ship faster and stay reliable." | |
| --build-env NEXT_PUBLIC_SITE_URL="https://cloudforgeops.vercel.app" | |
| --build-env NEXT_PUBLIC_SITE_OG_IMAGE="/images/og-default.png" | |
| --build-env NEXT_PUBLIC_CONTACT_EMAIL="sagardeepak2002@gmail.com" | |
| --build-env NEXT_PUBLIC_SOCIAL_GITHUB="https://github.com/sagarDeepakDevOps" | |
| --build-env NEXT_PUBLIC_SOCIAL_LINKEDIN="https://linkedin.com/in/sagardeepak2002" | |
| --build-env NEXT_PUBLIC_OWNER_NAME="Deepak Sagar" | |
| --build-env NEXT_PUBLIC_OWNER_TITLE="Freelance DevOps & Cloud Engineer" | |
| --build-env NEXT_PUBLIC_OWNER_EXPERIENCE="3+" | |
| --build-env NEXT_PUBLIC_OWNER_EXPERIENCE_LABEL="Hands-On Cloud & Automation Experience" | |
| --build-env NEXT_PUBLIC_OWNER_BIO="I work directly with founders and engineering teams to design, automate, and stabilize cloud environments across AWS and Azure." | |
| --build-env NEXT_PUBLIC_OWNER_LINKEDIN="https://linkedin.com/in/sagardeepak2002" | |
| --build-env NEXT_PUBLIC_FREE_REVIEW_HREF="/free-review" | |
| --build-env NEXT_PUBLIC_FREE_REVIEW_DURATION="30 min" | |
| --build-env NEXT_PUBLIC_CALENDLY_URL="https://calendly.com/sagardeepak2002/30min" |