@@ -17,6 +17,12 @@ pull request with the preview and inspect URLs. Intended to be called from a
1717| ---------------| ----------| --------------------------|
1818| vercel-token | ✅ | Vercel deployment token |
1919
20+ #### Concurrency
21+
22+ Runs are grouped by pull request ** and** ` vercel-project-id ` , with
23+ ` cancel-in-progress: true ` . A new commit supersedes the in-flight preview for
24+ that project, while previews for other projects are left alone.
25+
2026#### Example Usage
2127
2228``` yaml
3440 secrets :
3541 vercel-token : ${{ secrets.VERCEL_TOKEN }}
3642` ` `
43+
44+ #### Deploying more than one Vercel project
45+
46+ Call the workflow once per project. Give each call a distinct
47+ ` environment-name`, otherwise every job writes its deployment status and URL to
48+ the same GitHub Environment and the last one to finish wins.
49+
50+ ` ` ` yaml
51+ jobs:
52+ deploy-storefront-preview:
53+ uses: aligent/workflows/.github/workflows/vercel-preview.yml@main
54+ with:
55+ vercel-org-id: ${{ vars.VERCEL_ORG_ID }}
56+ vercel-project-id: ${{ vars.VERCEL_PROJECT_ID }}
57+ environment-name: Preview
58+ secrets:
59+ vercel-token: ${{ secrets.VERCEL_TOKEN }}
60+
61+ deploy-admin-preview:
62+ uses: aligent/workflows/.github/workflows/vercel-preview.yml@main
63+ with:
64+ vercel-org-id: ${{ vars.VERCEL_ORG_ID }}
65+ vercel-project-id: ${{ vars.VERCEL_ADMIN_PROJECT_ID }}
66+ environment-name: Preview - admin
67+ secrets:
68+ vercel-token: ${{ secrets.VERCEL_TOKEN }}
69+ ` ` `
70+
71+ Each project gets its own PR comment, keyed on the project ID.
0 commit comments