docs(website): add Docusaurus documentation site #3
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
| # VisitRomagna Deploy Pipeline | |
| # Deploys to production on main branch push (after CI passes) | |
| name: Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| NODE_VERSION: '22' | |
| jobs: | |
| deploy: | |
| name: Deploy to Production | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma Client | |
| run: npx prisma generate | |
| - name: Run Prisma migrations | |
| run: npx prisma migrate deploy | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| - name: Build | |
| run: npm run build | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} | |
| STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }} | |
| NEXT_PUBLIC_BASE_URL: ${{ vars.NEXT_PUBLIC_BASE_URL }} | |
| # Vercel deployment (primary target) | |
| - name: Deploy to Vercel | |
| if: env.VERCEL_TOKEN != '' | |
| 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 }} | |
| vercel-args: '--prod' | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| - name: Post-deploy health check | |
| if: vars.NEXT_PUBLIC_BASE_URL != '' | |
| run: | | |
| sleep 10 | |
| curl -f "${{ vars.NEXT_PUBLIC_BASE_URL }}/api/health" || echo "Health check pending..." |