-
Notifications
You must be signed in to change notification settings - Fork 0
WIP; do not merge - testing Vercel build triggers #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9b52774
198d6d7
d66d8c2
acafbba
70605c6
247552f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Vercel Preview Deployment | ||
|
|
||
| env: | ||
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| Deploy-Preview: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Install Vercel CLI | ||
| run: npm install --global vercel@latest | ||
| - name: Pull Vercel env info | ||
| run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
| - name: Build | ||
| run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
| - name: Deploy preview | ||
| run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --yes |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||||||||||||||||||||||||||
| name: Vercel Production Deployment | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||||||||||||||||||||||||||||||||||
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||
| Deploy-Production: | ||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||
| - name: Install Vercel CLI | ||||||||||||||||||||||||||||||||||
| run: npm install --global vercel@latest | ||||||||||||||||||||||||||||||||||
| - name: Pull Vercel env info | ||||||||||||||||||||||||||||||||||
| run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||||||||||||||||||||||||||||||||||
| - name: Build | ||||||||||||||||||||||||||||||||||
| run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||||||||||||||||||||||||||||||||||
| - name: Deploy production | ||||||||||||||||||||||||||||||||||
| run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} --yes | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+20
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Token exposure risk in command-line arguments. Passing 🔎 Recommended fix to use environment variables for the token - name: Pull Vercel env info
- run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
+ run: vercel pull --yes --environment=production
+ env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Build
- run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
+ run: vercel build --prod
+ env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Deploy production
- run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} --yes
+ run: vercel deploy --prebuilt --prod --yes
+ env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Add concurrency controls for production deployments.
Without concurrency controls, rapid pushes to main could trigger multiple simultaneous production deployments. For production, it's critical to ensure only one deployment runs at a time and that the latest commit is deployed.
🔎 Recommended addition after line 10
on: push: branches: - main + +concurrency: + group: production + cancel-in-progress: falseNote: Using
cancel-in-progress: falseensures deployments complete in order rather than canceling in-progress ones.📝 Committable suggestion
🤖 Prompt for AI Agents