mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 16:53:19 +08:00
fix: vercel preview builds (#1783)
* test: env echo * fix: attempt direct comparison * fix: var is a string * fix: remove debug
This commit is contained in:
9
.github/workflows/vercel.yml
vendored
9
.github/workflows/vercel.yml
vendored
@@ -19,9 +19,6 @@ jobs:
|
||||
name: ${{ github.ref_name == 'master' && 'Production' || 'Preview' }}
|
||||
url: ${{ github.ref_name == 'master' && 'https://stacks-blockchain-api.vercel.app/' || 'https://stacks-blockchain-api-pbcblockstack-blockstack.vercel.app/' }}
|
||||
|
||||
env:
|
||||
PROD: ${{ github.ref_name == 'master' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -53,14 +50,14 @@ jobs:
|
||||
run: npm install --global vercel@latest
|
||||
|
||||
- name: Pull Vercel environment information
|
||||
run: vercel pull --yes --environment=${{ env.PROD && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }}
|
||||
run: vercel pull --yes --environment=${{ github.ref_name == 'master' && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }}
|
||||
|
||||
- name: Build project artifacts
|
||||
run: vercel build ${{ env.PROD && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }}
|
||||
run: vercel build ${{ github.ref_name == 'master' && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }}
|
||||
|
||||
- name: Deploy project artifacts to Vercel
|
||||
id: deploy
|
||||
run: vercel ${{ env.PROD && '--prod' || 'deploy' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | awk '{print "deployment_url="$1}' >> $GITHUB_OUTPUT
|
||||
run: vercel ${{ github.ref_name == 'master' && '--prod' || 'deploy' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | awk '{print "deployment_url="$1}' >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add comment with Vercel deployment URL
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
Reference in New Issue
Block a user