|
1 | | -# Deployment Guide for Celo Composer React/Next App Using Vercel CLI |
| 1 | +# **Deployment Guide for Celo Composer React/Next.js App Using Vercel CLI** |
2 | 2 |
|
3 | | -This document provides step-by-step instructions for deploying your Next.js app to Vercel using the Vercel CLI. |
| 3 | +This document provides step-by-step instructions for deploying your Next.js app to Vercel using the Vercel CLI. |
4 | 4 |
|
5 | | -## Prerequisites |
| 5 | +## **Prerequisites** |
6 | 6 |
|
7 | | -1. **Node.js installed**: Ensure Node.js is installed on your system. |
| 7 | +1. **Node.js installed**: Ensure that Node.js is installed on your system. |
8 | 8 |
|
9 | | -## Step 1: Install Vercel CLI |
| 9 | +## **Step 1: Install Vercel CLI** |
10 | 10 |
|
11 | | -Install Vercel CLI globally using npm or pnpm: |
| 11 | +Install the Vercel CLI globally using npm or pnpm: |
12 | 12 |
|
13 | 13 | ```bash |
14 | 14 | npm install -g vercel |
15 | 15 | # OR if using pnpm |
16 | 16 | pnpm add -g vercel |
17 | | -``` |
| 17 | +``` |
18 | 18 |
|
19 | | -## Step 2: Login to Vercel |
| 19 | +## **Step 2: Log in to Vercel** |
20 | 20 |
|
21 | | -Log in to your Vercel account: |
| 21 | +Log in to your Vercel account: |
22 | 22 |
|
23 | 23 | ```bash |
24 | 24 | vercel login |
25 | | -``` |
| 25 | +``` |
26 | 26 |
|
27 | | -Follow the on-screen instructions to authenticate your account. |
| 27 | +Follow the on-screen instructions to authenticate your account. |
28 | 28 |
|
29 | | -## Step 3: Goto React App |
| 29 | +## **Step 3: Navigate to the React App Directory** |
30 | 30 |
|
31 | | -Navigate to the root directory of your Next.js app: |
| 31 | +Move to the root directory of your Next.js app: |
32 | 32 |
|
33 | 33 | ```bash |
34 | 34 | cd packages/react-app |
35 | | -``` |
| 35 | +``` |
36 | 36 |
|
37 | | -## Step 4: Deploy the App |
| 37 | +## **Step 4: Deploy the App** |
38 | 38 |
|
39 | | -To deploy your Celo Composer app using Vercel CLI, run: |
| 39 | +To deploy your Celo Composer app using the Vercel CLI, run: |
40 | 40 |
|
41 | 41 | ```bash |
42 | 42 | vercel |
43 | | -``` |
| 43 | +``` |
44 | 44 |
|
45 | | -> [!NOTE] |
46 | | -> First-Time Deployment: |
47 | | -> |
48 | | -> - The CLI will ask several questions, including project scope, project name, and framework detection. |
49 | | -> |
50 | | -> Subsequent Deployments: |
51 | | -> |
52 | | -> - Run vercel to deploy the latest changes without additional configuration. |
| 45 | +> **Note:** |
| 46 | +> **First-Time Deployment:** |
| 47 | +> - The CLI will ask several questions, including project scope, project name, and framework detection. |
| 48 | +> |
| 49 | +> **Subsequent Deployments:** |
| 50 | +> - Run `vercel` to deploy the latest changes without additional configuration. |
53 | 51 |
|
54 | | -## Step 5: View Deployment Status |
| 52 | +## **Step 5: View Deployment Status** |
55 | 53 |
|
56 | | -After deployment, you’ll receive a preview deployment URL: |
| 54 | +After deployment, you’ll receive a preview deployment URL: |
57 | 55 |
|
58 | 56 | ```bash |
59 | 57 | https://<project-name>.vercel.app |
60 | | -``` |
| 58 | +``` |
61 | 59 |
|
62 | | -> [!IMPORTANT] |
63 | | -> Important: This preview deployment is only accessible to the authenticated user (the Vercel account owner). To make your app publicly accessible, you need to deploy to production. |
| 60 | +> **Important:** |
| 61 | +> This preview deployment is only accessible to the authenticated user (the Vercel account owner). To make your app publicly accessible, you need to deploy it to production. |
64 | 62 |
|
65 | | -## Step 6: Deploy to Production |
| 63 | +## **Step 6: Deploy to Production** |
66 | 64 |
|
67 | | -To make the app publicly accessible, deploy it to production: |
| 65 | +To make the app publicly accessible, deploy it to production: |
68 | 66 |
|
69 | 67 | ```bash |
70 | 68 | vercel deploy --prod |
71 | | -``` |
| 69 | +``` |
72 | 70 |
|
73 | | -This command creates a production deployment accessible to everyone. |
| 71 | +This command creates a production deployment that is accessible to everyone. |
74 | 72 |
|
75 | | -## Step 8: Configure Environment Variables |
| 73 | +## **Step 7: Configure Environment Variables** |
76 | 74 |
|
77 | | -If your app uses environment variables, configure them in Vercel: |
| 75 | +If your app uses environment variables, configure them in Vercel: |
78 | 76 |
|
79 | | -1. Go to the Vercel Dashboard. |
80 | | -2. Select your project. |
81 | | -3. Go to Settings > Environment Variables. |
82 | | -4. Add variables for Development, Preview, and Production environments. |
| 77 | +1. Go to the **Vercel Dashboard**. |
| 78 | +2. Select your project. |
| 79 | +3. Navigate to **Settings > Environment Variables**. |
| 80 | +4. Add variables for Development, Preview, and Production environments. |
83 | 81 |
|
84 | | -Alternatively, use Vercel CLI: |
| 82 | +Alternatively, you can set environment variables using the Vercel CLI: |
85 | 83 |
|
86 | 84 | ```bash |
87 | 85 | vercel env add <variable-name> <variable-value> |
88 | | -``` |
| 86 | +``` |
89 | 87 |
|
90 | | -## Step 9: Update Deployment |
| 88 | +## **Step 8: Update Deployment** |
91 | 89 |
|
92 | | -Whenever you make changes to your code, update the deployment: |
| 90 | +Whenever you make changes to your code, update the deployment: |
93 | 91 |
|
94 | | -- Preview deployment: `vercel` |
95 | | -- Production deployment: `vercel --prod` |
| 92 | +- **For a preview deployment:** |
| 93 | + ```bash |
| 94 | + vercel |
| 95 | + ``` |
| 96 | +- **For a production deployment:** |
| 97 | + ```bash |
| 98 | + vercel --prod |
| 99 | + ``` |
0 commit comments