File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 4444
4545 - name : Build
4646 run : yarn build
47+
48+ deploy-vercel :
49+ runs-on : ubuntu-latest
50+ needs : build
51+ steps :
52+ - name : Checkout
53+ uses : actions/checkout@v4
54+
55+ - name : Setup Node.js environment
56+ uses : actions/setup-node@v4
57+ with :
58+ node-version : 18
59+ cache : " yarn"
60+
61+ - name : Get yarn cache directory path
62+ id : yarn-cache-dir-path
63+ run : echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
64+
65+ - uses : actions/cache@v3
66+ id : yarn-cache
67+ with :
68+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
69+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
70+ restore-keys : |
71+ ${{ runner.os }}-yarn-
72+
73+ - name : Install dependencies
74+ run : yarn
75+
76+ - name : Deploy to Vercel if needed
77+ run : |
78+ npm install --global vercel@latest
79+ vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
80+ vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
81+ vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
You can’t perform that action at this time.
0 commit comments