File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 7676 export GITHUB_SHA=${{ inputs.sha }}
7777 export GITHUB_REF_NAME=${{ inputs.ref-name }}
7878
79- pnpx vercel build
79+ if [ "${{ inputs.environment }}" = "production" ]; then
80+ pnpx vercel build --prod
81+ else
82+ pnpx vercel build
83+ fi
8084 shell : bash
8185
8286 - name : Patch
@@ -103,8 +107,14 @@ runs:
103107 - name : Deploy
104108 id : deploy
105109 run : |
110+ PROD_FLAGS=""
111+ if [ "${{ inputs.environment }}" = "production" ]; then
112+ PROD_FLAGS="--prod --skip-domain"
113+ fi
114+
106115 pnpx vercel deploy \
107116 --prebuilt \
117+ $PROD_FLAGS \
108118 --token ${{ inputs.vercel-token }} \
109119 2> >(tee info.txt >&2) | tee domain.txt
110120
Original file line number Diff line number Diff line change 6262 sha : ${{ github.sha }}
6363 environment : ${{ matrix.environment }}
6464
65+ - uses : ./.github/actions/vercel
66+ if : matrix.environment == 'staging'
67+ id : vercel-prod
68+ name : Deploy to Vercel
69+ with :
70+ vercel-token : ${{ secrets.VERCEL_TOKEN }}
71+ vercel-org-id : ${{ secrets.VERCEL_ORG_ID }}
72+ vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }}
73+ ref-name : ${{ github.ref_name }}
74+ sha : ${{ github.sha }}
75+ environment : " production"
76+
6577 - name : Debug Vercel Outputs
6678 run : |
6779 echo "domain=${{ steps.vercel.outputs.domain }}"
7486 description : " [${{ matrix.environment }}] Vercel logs"
7587 url : " ${{ steps.vercel.outputs.inspect-url }}"
7688
89+ - uses : ./.github/actions/add-status
90+ if : matrix.environment == 'staging'
91+ with :
92+ title : " ⏰ [${{ matrix.environment }}] Vercel Production Inspection"
93+ description : " [${{ matrix.environment }}] Vercel production logs"
94+ url : " ${{ steps.vercel-prod.outputs.inspect-url }}"
95+
7796 - uses : ./.github/actions/add-status
7897 with :
7998 title : " ⭐ [${{ matrix.environment }}] Apps Webstudio URL"
You can’t perform that action at this time.
0 commit comments