Skip to content

Commit 1d5649f

Browse files
committed
Fix zero-context-protocol CI workflows
1 parent ce9cb7f commit 1d5649f

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/secret-scan.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ jobs:
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

.github/workflows/vercel-production.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ on:
88

99
jobs:
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
@@ -36,3 +37,12 @@ jobs:
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."

0 commit comments

Comments
 (0)