docs: add neon functions github actions guide - #5469
Conversation
|
@dhanushreddy291 is attempting to deploy a commit to the neondatabase Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a new guide under content/guides/ that walks readers through setting up CI/CD for Neon Functions using GitHub Actions, including per-PR preview functions, production deploys on main, and cleanup on PR close.
Changes:
- New end-to-end tutorial for building and deploying a Neon Function (Hono + Postgres) via the Neon CLI.
- Adds a GitHub Actions workflow example covering preview deploys, production deploys, and cleanup.
- Adds supporting references and screenshots for PR comments and multi-function previews.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| createdAt: '2026-08-06T00:00:00.000Z' | ||
| updatedOn: '2026-08-07T08:36:27.530Z' |
There was a problem hiding this comment.
no updatedOn is present in all guides
| # Ensures only the latest commit runs, preventing race conditions in concurrent PR updates | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
|
|
| - uses: actions/checkout@v7 | ||
|
|
||
| - uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 24 |
There was a problem hiding this comment.
used v7 for both jobs
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const urls = fs.readFileSync('function_urls.txt', 'utf8'); |
There was a problem hiding this comment.
updated now. the pr was in draft before, so didn't double check it earlier.
There was a problem hiding this comment.
removed the fs and the edit comment functionality for simplicity of the yaml file.
The comments by the bot will be stacked on new updates to a PR now (instead of in-place edit)
|
|
||
| ## Understanding the workflow | ||
|
|
||
| The workflow has three jobs, and each one runs the same idea: deploy function to a branch. Because functions are branch-scoped, every environment ends up with its own function at its own URL, running against its own database state. Thinking of it as "deploy to a branch" makes the whole workflow easy to follow. |
There was a problem hiding this comment.
updated to The workflow (excluding the setup) has three main jobs :
| npm install --save-dev @types/pg typescript dotenv | ||
| ``` | ||
|
|
||
| You now have a project linked to Neon and the necessary dependencies to build a Hono based API that interacts with your Neon Postgres database. |
|
|
||
| The workflow has three jobs, and each one runs the same idea: deploy function to a branch. Because functions are branch-scoped, every environment ends up with its own function at its own URL, running against its own database state. Thinking of it as "deploy to a branch" makes the whole workflow easy to follow. | ||
|
|
||
| - **Deploy preview**: Runs when a PR is opened, reopened, or updated. It creates an isolated branch, deploys to it, comments the preview URL on the PR, and leaves the preview url as a comment for review. |
https://neon-next-git-fork-dhanushreddy291-add-docs-08b25e-neondatabase.vercel.app/guides/neon-functions-github-actions