Skip to content

Commit f77a91f

Browse files
authored
ci: update vercel ci (#294)
Update vercel.yml
1 parent aae897a commit f77a91f

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

.github/workflows/vercel.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ jobs:
1515
vercel:
1616
runs-on: ubuntu-latest
1717

18-
environment:
19-
name: ${{ github.ref_name == 'master' && 'Production' || 'Preview' }}
20-
url: ${{ github.ref_name == 'master' && 'https://token-metadata-api.vercel.app/' || 'https://token-metadata-api-pbcblockstack-blockstack.vercel.app/' }}
21-
22-
env:
23-
PROD: ${{ github.ref_name == 'master' }}
24-
2518
steps:
2619
- uses: actions/checkout@v2
2720
with:
@@ -32,35 +25,21 @@ jobs:
3225
with:
3326
node-version-file: '.nvmrc'
3427

35-
- name: Cache node modules
36-
uses: actions/cache@v2
37-
env:
38-
cache-name: cache-node-modules
39-
with:
40-
path: |
41-
~/.npm
42-
**/node_modules
43-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
44-
restore-keys: |
45-
${{ runner.os }}-build-${{ env.cache-name }}-
46-
${{ runner.os }}-build-
47-
${{ runner.os }}-
48-
4928
- name: Install deps
5029
run: npm ci --audit=false
5130

5231
- name: Install Vercel CLI
5332
run: npm install --global vercel@latest
5433

5534
- name: Pull Vercel environment information
56-
run: vercel pull --yes --environment=${{ env.PROD && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }}
35+
run: vercel pull --yes --environment=${{ github.ref_name == 'master' && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }}
5736

5837
- name: Build project artifacts
59-
run: vercel build ${{ env.PROD && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }}
38+
run: vercel build ${{ github.ref_name == 'master' && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }}
6039

6140
- name: Deploy project artifacts to Vercel
6241
id: deploy
63-
run: vercel ${{ env.PROD && '--prod' || 'deploy' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | awk '{print "deployment_url="$1}' >> $GITHUB_OUTPUT
42+
run: vercel ${{ github.ref_name == 'master' && '--prod' || 'deploy' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | awk '{print "deployment_url="$1}' >> $GITHUB_OUTPUT
6443

6544
- name: Trigger docs.hiro.so deployment
6645
if: github.ref_name == 'master'

0 commit comments

Comments
 (0)