{"repo":"neondatabase/preview-branches-with-fly","free":true,"listed":false,"github":"https://github.com/neondatabase/preview-branches-with-fly","clone":"git clone https://github.com/neondatabase/preview-branches-with-fly.git","description":"A Neon branch for every Fly Preview app","language":"TypeScript","stars":26,"topics":["drizzle-orm","fly","github-actions","postgres","postgresql","pr-preview"],"license":null,"category":"databases-storage","readme_excerpt":"Preview branches with Fly.io and Neon This is an example project that shows how you can create a branch for every Fly.io preview deployment. Tech Stack - DB: Neon - Hosting: Fly.io - App: Fastify - Node Package Management: pnpm - ORM: Drizzle Getting started You can copy the files located at .github/workflows/ and add them to your own project. You will then need to set the following secrets in your repository: - FLY API TOKEN : Your Fly.io API token, you can find it in your Fly.io account settings. - NEON API KEY : Your Neon API key, you can find it in your Neon account settings. - DATABASE URL : The connection string for your production database. You can find it in your Neon project's connection details. - GH TOKEN : A GitHub token with access to your repository, you can create one in your GitHub account settings. You will need to give it access to the repo scope so that the deploy-preview workflow can comment on the pull request. You can uncomment the step which uses this token in the .github/workflows/deploy-preview.yml workflow file. You will then need to set the following variables: - NEON PROJECT ID : The ID of your Neon project, you can find it in your Neon project settings. How it works Preview deployment .github/workflows/deploy-preview.yml automates the deployment process to a preview environment. Activated on a pull request event Requires the NEON API KEY , NEON PROJECT ID , GH TOKEN , and FLY API TOKEN secrets that are set in the repository. The workflow has a sin","default_branch":null,"files":null,"tree":[],"storefront":"/r/neondatabase","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/neondatabase/preview-branches-with-fly/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}