ci(installer): fix token passing and only run on main repo

This commit is contained in:
Marc Cornellà 2023-11-30 14:15:21 +01:00
parent 418046e958
commit 7a30bcae40
No known key found for this signature in database
GPG Key ID: 0314585E776A9C1B

View File

@ -17,6 +17,7 @@ permissions:
jobs: jobs:
test: test:
name: Test installer name: Test installer
if: github.repository == 'ohmyzsh/ohmyzsh'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
@ -48,7 +49,8 @@ jobs:
env: env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: | run: |
cp tools/install.sh .github/workflows/installer/install.sh cp tools/install.sh .github/workflows/installer/install.sh
cd .github/workflows/installer cd .github/workflows/installer
vc deploy --prod -t ${{ secrets.VERCEL_TOKEN }} vc deploy --prod -t "$VERCEL_TOKEN"