mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
4ca9a3edbd
build durable, resilient, and observable workflows. Co-authored-by: Nathan Rajlich <n@n8.io> Co-authored-by: Pranay Prakash <pranay.gp@gmail.com> Co-authored-by: Adrian <me@adriandlam.com> Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Vercel Release Bot <88769842+vercel-release-bot@users.noreply.github.com> Co-authored-by: Peter Wielander <mittgfu@gmail.com> Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com> Co-authored-by: Gal Schlezinger <gal@spitfire.co.il> Co-authored-by: Manuel Muñoz Solera <mamuso@mamuso.net> Co-authored-by: Garrett <garrett.tolbert@vercel.com> Co-authored-by: Lars Grammel <lars.grammel@gmail.com> Co-authored-by: Pooya Parsa <pyapar@gmail.com> Co-authored-by: Tom Dale <tom@tomdale.net> Co-authored-by: Vishal Yathish <135551666+visyat@users.noreply.github.com> Co-authored-by: josh <144584931+dancer@users.noreply.github.com>
54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
---
|
|
description: Workflow testing and deployment process guide
|
|
alwaysApply: false
|
|
---
|
|
|
|
# Workflow Testing and Deployment Process
|
|
|
|
When testing and deploying changes in workflow, follow these steps to see them work with a real example app:
|
|
|
|
## Deployment Steps
|
|
|
|
1. **Make your changes** to the codebase
|
|
|
|
2. **Build the project**
|
|
|
|
```bash
|
|
cd workbench/example
|
|
pnpx turbo build
|
|
```
|
|
|
|
3. **Deploy to Vercel**
|
|
|
|
```bash
|
|
cd workbench/example
|
|
vc deploy --prebuilt
|
|
```
|
|
|
|
4. **Test the deployment**
|
|
Make a POST request to the "Preview" URL logged from the deployment command:
|
|
|
|
```bash
|
|
curl -X POST "https://w-abcdefg1234-uncurated-tests.vercel.app/api/trigger\?workflow=simple&args\=42"
|
|
```
|
|
|
|
*(Replace the URL with the actual preview URL from your deployment)*
|
|
*(If a different workflow/argument needs to be tested, adjust the URL accordingly. The URL takes a workflow and and args query param. The workflows can be found inside workbench/example/workflows - the exported workflow function name is the name of the workflow, and the args are a comma separated list of inputs to that function)*
|
|
|
|
Here's an example of testing the AI workflow
|
|
|
|
```bash
|
|
curl -X POST "https://w-abcdefg1234-uncurated-tests.vercel.app/api/trigger\?workflow=ai&args\=what+is+love?"
|
|
```
|
|
|
|
5. **Inspect the results**
|
|
Open the "Inspect" URL in a browser (logged from the previous CLI command)
|
|
Attempt to open the URL using the `open` CLI tool. If it's not installed, just provide the link to the user to allow them to open it.
|
|
|
|
## Important Notes
|
|
|
|
- All build and deploy commands should be run from the `workbench/example` directory
|
|
- The preview URL will be different for each deployment
|
|
- The inspect URL allows you to monitor the workflow execution
|
|
- Make sure to use the actual URLs provided by the deployment output, not the example URLs shown above
|