-
Notifications
You must be signed in to change notification settings - Fork 1
Block vercel deployment on test success #6
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2ccc661
Block vercel deployment on test success
piyush-jaiswal 54fd1ac
Cancel the previous running deployment of PR if new deployment detected
piyush-jaiswal 90cfa87
Wait for previous deployment in prod to finish before running current
piyush-jaiswal 9f3c336
Pin vercel version
piyush-jaiswal 1a533b6
Don't deploy for PR from forked repos
piyush-jaiswal 3ba7cdc
Stop all automated vercel deployments
piyush-jaiswal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Vercel Preview Deployment | ||
|
|
||
| env: | ||
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ "master" ] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: "vercel-preview-${{ github.event.pull_request.number }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| uses: ./.github/workflows/tests.yml | ||
|
|
||
| deploy-preview: | ||
| needs: [test] | ||
| runs-on: ubuntu-latest | ||
| # Do not run for PR from forks | ||
| if: github.event.pull_request.head.repo.full_name == github.repository | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Vercel CLI | ||
| run: npm install --global [email protected] | ||
|
|
||
| - name: Pull Vercel Environment Information | ||
| run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
|
|
||
| - name: Build Project Artifacts | ||
| run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
|
|
||
| - name: Deploy Project Artifacts to Vercel | ||
| run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Vercel Production Deployment | ||
|
|
||
| env: | ||
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: "vercel-production-${{ github.ref }}" | ||
| cancel-in-progress: false # waits for the previous one to finish | ||
|
|
||
| jobs: | ||
| test: | ||
| uses: ./.github/workflows/tests.yml | ||
|
|
||
| deploy-production: | ||
| needs: [test] | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Vercel CLI | ||
| run: npm install --global [email protected] | ||
|
|
||
| - name: Pull Vercel Environment Information | ||
| run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
|
|
||
| - name: Build Project Artifacts | ||
| run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
|
|
||
| - name: Deploy Project Artifacts to Vercel | ||
| run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,5 +4,9 @@ | |
| "src": "/(.*)", | ||
| "dest": "/api/vercel_function" | ||
| } | ||
| ] | ||
| ], | ||
|
|
||
| "git": { | ||
| "deploymentEnabled": false | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.