Skip to content

fix(deploy): read VPS_APP_DIR from vars instead of secrets#43

Merged
JohnRDOrazio merged 2 commits intomainfrom
fix/prod-deploy-vps-app-dir-var
Apr 30, 2026
Merged

fix(deploy): read VPS_APP_DIR from vars instead of secrets#43
JohnRDOrazio merged 2 commits intomainfrom
fix/prod-deploy-vps-app-dir-var

Conversation

@JohnRDOrazio
Copy link
Copy Markdown
Member

Summary

Hotfix for the production Build and Deploy workflow. The
VPS_APP_DIR GitHub secret was moved to a repo variable, but
deploy.yml still references ${{ secrets.VPS_APP_DIR }}. Without
this change, the next production deploy would expand to an empty
string in the SSH command — mkdir -p "", tar ... -C "",
touch "/tmp/restart.txt" — silently breaking the deploy.

Why this is urgent

Currently no scheduled deploys, but a workflow_dispatch or release
publication would fail until this lands.

Related

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@JohnRDOrazio has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 20 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06636603-3b68-4116-bbf4-7f0b56a246b4

📥 Commits

Reviewing files that changed from the base of the PR and between b3edd52 and 1b9ba74.

📒 Files selected for processing (1)
  • .github/workflows/deploy.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/prod-deploy-vps-app-dir-var

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 21 minutes and 20 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 30, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

JohnRDOrazio added a commit that referenced this pull request Apr 30, 2026
Same fix as PR #43 applied to the staging workflow: NEXT_PUBLIC_*
env vars are inlined at build time, so without setting it the
staging client bundle (e.g. components/blog/ShareButtons.tsx) would
ship the hardcoded production URL fallback instead of the staging
URL.

Reads from the new NEXT_PUBLIC_SITE_URL_STAGING repo variable so
share buttons, sitemap canonicals, and other client-side absolute
URLs on staging point to staging.catholicdigitalcommons.org.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JohnRDOrazio and others added 2 commits April 30, 2026 19:44
The VPS_APP_DIR repo secret was moved to a repo variable. Without
this update the production deploy workflow expands ${{ secrets.VPS_APP_DIR }}
to an empty string and the SSH step would mkdir/tar/touch into the
wrong path, breaking deploys.

Mirrors the convention now used in deploy-staging.yml (PR #42) — an
app directory path isn't a credential, so it belongs in vars.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NEXT_PUBLIC_* env vars are inlined into the client bundle at build
time, not read from process.env at runtime. The Plesk-panel value
helps server code but client components (e.g.
components/blog/ShareButtons.tsx) ship whatever was set when
\`next build\` ran.

Without this, the production bundle falls back to the hardcoded
'https://catholicdigitalcommons.org' literal in code — which happens
to match prod, so it has been silently OK. Setting it from
NEXT_PUBLIC_SITE_URL_PROD makes the configuration explicit and lets
the staging workflow set its own value via NEXT_PUBLIC_SITE_URL_STAGING
(see PR #42).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnRDOrazio JohnRDOrazio force-pushed the fix/prod-deploy-vps-app-dir-var branch from b15ec6b to 1b9ba74 Compare April 30, 2026 17:45
@JohnRDOrazio JohnRDOrazio merged commit 843840f into main Apr 30, 2026
9 checks passed
@JohnRDOrazio JohnRDOrazio deleted the fix/prod-deploy-vps-app-dir-var branch April 30, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant