Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit fed8615

Browse files
committed
docs(README): add deployment and NEXT_PUBLIC_VERCEL_ENV note
1 parent d78ebc5 commit fed8615

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

frontend/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ nvm install; # to install the version in .nvmrc
8787
5. To test Walletconnect functionality, copy `.env.development` to `.env.local` and fill in your `INFURA_ID`.
8888
`INFURA_ID` can be easily obtained by register at <https://infura.io/>, then create a new Ethereum project for free.
8989

90+
### Deployment
91+
92+
This project uses Vercel to manage deployments. We use the Vercel GitHub integration to automatically deploy in two situations:
93+
94+
- When code is merged into `main`, a production deployment is triggered. Vercel will build the project and deploy it to `developerdao.com`.
95+
- When a pull request is created, a preview deployment is triggered. Vercel will build the project from the PR's code and deploy it to an auto-generated URL.
96+
97+
In both cases, Vercel runs `next build` to build the project. Since running `next build` automatically sets `NODE_ENV` to `production`, if you need to distinguish between an actual production deployment and a PR preview deployment (example: we only want to run code that connects to analytics in production and not for preview deploys), use the `NEXT_PUBLIC_VERCEL_ENV` (`process.env.NEXT_PUBLIC_VERCEL_ENV`) environment variable. This variable exists in Vercel and provides the following values:
98+
99+
| Vercel Environment | value |
100+
| --- | --- |
101+
| Production | `production` |
102+
| Preview | `preview` |
103+
| Development | `development` |
104+
90105
## Contributing
91106

92107
Thanks for showing interest in contributing to Developer DAO. Before submitting any changes please review our contributing gudielines in [CONTRIBUTING.md](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)