File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@v4
15- - uses : gitleaks/gitleaks-action@v2
16- env :
17- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
15+ with :
16+ fetch-depth : 0
17+ - name : Install gitleaks
18+ run : |
19+ set -euo pipefail
20+ VERSION=8.28.0
21+ curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${VERSION}/gitleaks_${VERSION}_linux_x64.tar.gz" \
22+ | tar -xz
23+ sudo install gitleaks /usr/local/bin/gitleaks
24+ - name : Run gitleaks
25+ run : gitleaks git --source . --redact --no-banner --exit-code 1 --verbose
Original file line number Diff line number Diff line change 88
99jobs :
1010 deploy :
11+ if : ${{ secrets.VERCEL_TOKEN != '' && secrets.VERCEL_ORG_ID != '' && secrets.VERCEL_PROJECT_ID != '' }}
1112 runs-on : ubuntu-latest
1213 steps :
1314 - uses : actions/checkout@v4
1415 - uses : actions/setup-node@v4
1516 with :
16- node-version : " 20 "
17+ node-version : " 22 "
1718 cache : " npm"
1819 cache-dependency-path : docs/web/package-lock.json
1920 - name : Install Vercel CLI
3637 env :
3738 VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
3839 VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
40+
41+ skip-without-secrets :
42+ if : ${{ secrets.VERCEL_TOKEN == '' || secrets.VERCEL_ORG_ID == '' || secrets.VERCEL_PROJECT_ID == '' }}
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Skip deploy when Vercel secrets are missing
46+ run : |
47+ echo "Skipping Vercel production deploy because VERCEL_TOKEN, VERCEL_ORG_ID, or VERCEL_PROJECT_ID is not configured."
48+ echo "Configure those repository secrets to enable automatic production deployment."
You can’t perform that action at this time.
0 commit comments