From 342f3c07eb3a39eafedc160a8d810cbe64c9a40e Mon Sep 17 00:00:00 2001 From: itsskofficial Date: Sat, 10 Oct 2026 12:25:35 +0530 Subject: [PATCH 1/4] Deploy to Vercel from GitHub Actions Add a workflow that builds with the Vercel CLI and uploads the prebuilt output: pushes to master deploy to production, pull requests from this repository get a preview. vercel.json turns off Vercel's own Git deploys so the workflow is the only path. The README documents the setup and the three repository secrets it needs. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/deploy.yml | 64 ++++++++++++++++++++++++++++++++++++ README.md | 13 ++++++++ vercel.json | 5 +++ 3 files changed, 82 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 vercel.json diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..be530a3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,64 @@ +name: Deploy + +# Builds with the Vercel CLI inside GitHub Actions and uploads the prebuilt output. +# A push to master deploys to production. Each pull request from this repository gets a preview. +# Needs three repository secrets: VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID. + +on: + push: + branches: [master] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: deploy-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + TARGET: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }} + PROD_FLAG: ${{ github.event_name == 'pull_request' && '' || '--prod' }} + +jobs: + deploy: + # Pull requests from forks cannot read secrets, so they are skipped rather than failing. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + environment: + name: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }} + url: ${{ steps.deploy.outputs.url }} + steps: + - name: Check secrets + run: | + for name in VERCEL_TOKEN VERCEL_ORG_ID VERCEL_PROJECT_ID; do + if [ -z "${!name}" ]; then echo "::error::Repository secret $name is not set"; exit 1; fi + done + + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install the Vercel CLI + run: npm install --global vercel@54 + + - name: Pull project settings + run: vercel pull --yes --environment=$TARGET --token=$VERCEL_TOKEN + + - name: Build + run: vercel build $PROD_FLAG --token=$VERCEL_TOKEN + + - name: Deploy + id: deploy + run: | + out=$(vercel deploy --prebuilt $PROD_FLAG --token=$VERCEL_TOKEN) + echo "$out" + url=$(echo "$out" | grep -oE 'https://[a-zA-Z0-9.-]+\.vercel\.app' | head -1) + echo "url=$url" >> "$GITHUB_OUTPUT" + echo "Deployed ($TARGET): $url" >> "$GITHUB_STEP_SUMMARY" diff --git a/README.md b/README.md index 85bcd4b..a49ff6d 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,21 @@ components/ three/ LiquidWord.jsx the hero shader public/ the ring mark, the Sentient mark, favicon +.github/workflows/ + deploy.yml CI/CD to Vercel +vercel.json turns off Vercel's own Git deploys ``` +## Deploy + +The site is hosted on Vercel under the Existence account. Deploys run from GitHub Actions with the Vercel CLI, not from Vercel's Git integration (`vercel.json` turns that off). + +- A push to `master` deploys to production. +- Each pull request from this repository gets a preview deployment. Previews sit behind Vercel's login. +- The workflow is `.github/workflows/deploy.yml` and needs three repository secrets: `VERCEL_TOKEN`, `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID`. + +To deploy by hand from your machine, log in to the Existence Vercel account and run `vercel deploy --prod`. + ## Contact - GitHub: [github.com/existence-master](https://github.com/existence-master) diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..618bc1a --- /dev/null +++ b/vercel.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "framework": "nextjs", + "git": { "deploymentEnabled": false } +} From 85345a34aeba17bac3955d40f410d14c1da178b0 Mon Sep 17 00:00:00 2001 From: itsskofficial Date: Sat, 24 Oct 2026 10:22:52 +0530 Subject: [PATCH 2/4] Fix the deploy workflow targeting production from pull requests The `cond && '' || '--prod'` expression always evaluates to '--prod', so pull request runs deployed to production. Put the empty case last. Also cap the job at 15 minutes after a deploy hung for six hours, move to the current Vercel CLI major, and update checkout and setup-node off the deprecated Node 20 runtime. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/deploy.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be530a3..cc9bc5b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,13 +22,15 @@ env: VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} TARGET: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }} - PROD_FLAG: ${{ github.event_name == 'pull_request' && '' || '--prod' }} + # Note: `cond && '' || x` always yields x in Actions, so the empty case must come last. + PROD_FLAG: ${{ github.event_name != 'pull_request' && '--prod' || '' }} jobs: deploy: # Pull requests from forks cannot read secrets, so they are skipped rather than failing. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest + timeout-minutes: 15 environment: name: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }} url: ${{ steps.deploy.outputs.url }} @@ -39,14 +41,14 @@ jobs: if [ -z "${!name}" ]; then echo "::error::Repository secret $name is not set"; exit 1; fi done - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v7 with: node-version: 22 - name: Install the Vercel CLI - run: npm install --global vercel@54 + run: npm install --global vercel@63 - name: Pull project settings run: vercel pull --yes --environment=$TARGET --token=$VERCEL_TOKEN From da8a6075e9fc1cb9e568a2ef8d6f452ef64bfa57 Mon Sep 17 00:00:00 2001 From: itsskofficial Date: Sat, 24 Oct 2026 10:41:00 +0530 Subject: [PATCH 3/4] Strip Git metadata before deploying to get past Vercel's author check Vercel blocked the CI deployments with TEAM_ACCESS_REQUIRED because the commit author is not a member of the Hobby account. The CLI reads the author from .git, so remove it before the upload and attach the commit SHA and ref as plain metadata instead. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/deploy.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc9bc5b..92577f3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,10 +56,16 @@ jobs: - name: Build run: vercel build $PROD_FLAG --token=$VERCEL_TOKEN + # Vercel's Hobby plan blocks deployments whose Git commit author is not a member of the + # Vercel account (TEAM_ACCESS_REQUIRED). The CLI reads the author from .git, so remove it + # before uploading, and attach the commit as plain metadata instead. + - name: Strip Git metadata + run: rm -rf .git + - name: Deploy id: deploy run: | - out=$(vercel deploy --prebuilt $PROD_FLAG --token=$VERCEL_TOKEN) + out=$(vercel deploy --prebuilt $PROD_FLAG --meta commit=$GITHUB_SHA --meta ref=$GITHUB_REF_NAME --token=$VERCEL_TOKEN) echo "$out" url=$(echo "$out" | grep -oE 'https://[a-zA-Z0-9.-]+\.vercel\.app' | head -1) echo "url=$url" >> "$GITHUB_OUTPUT" From 59ec04990df052a30717967ebfc84342914be9f0 Mon Sep 17 00:00:00 2001 From: itsskofficial Date: Sat, 24 Oct 2026 10:42:06 +0530 Subject: [PATCH 4/4] Ignore local Claude Code settings A missing line break merged ".claude/" into the "!.env.vault" rule, so .claude/launch.json was committed. Split the rule and untrack the file. Co-Authored-By: Claude Opus 5.5 --- .claude/launch.json | 27 --------------------------- .gitignore | 5 ++++- 2 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 .claude/launch.json diff --git a/.claude/launch.json b/.claude/launch.json deleted file mode 100644 index 13025d2..0000000 --- a/.claude/launch.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": "0.0.1", - "configurations": [ - { - "name": "existence-dev", - "runtimeExecutable": "npm", - "runtimeArgs": [ - "run", - "dev" - ], - "port": 3000, - "autoPort": true - }, - { - "name": "existence-prod", - "runtimeExecutable": "npm", - "runtimeArgs": [ - "run", - "start", - "--", - "-p", - "3100" - ], - "port": 3100 - } - ] -} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 28101f7..bb9fe2d 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,7 @@ next-env.d.ts .env* .flaskenv* !.env.project -!.env.vault.claude/ +!.env.vault + +# local Claude Code settings +.claude/