Skip to content

Fix deploy workflow silently dropping dotfiles like .htaccess - #18

Merged
AlexanderWagnerDev merged 1 commit into
mainfrom
claude/peaceful-cannon-88d4ye
Sep 12, 2026
Merged

AlexanderWagnerDev merged 1 commit into
mainfrom
claude/peaceful-cannon-88d4ye

Conversation

@AlexanderWagnerDev

@AlexanderWagnerDev AlexanderWagnerDev commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • wlixcc/SFTP-Deploy-Action (used in the current deploy.yml) builds its final upload command from an unquoted shell glob (path/*). Bash/SFTP globbing with * never matches files starting with a dot, so .htaccess was silently skipped on every deploy while every other file uploaded fine.
  • Replace it with wangyucode/sftp-upload-action (pinned by commit SHA), which enumerates the local directory with Python's os.walk instead of shell globbing, so dotfiles are included correctly. This also lets us drop the manual rsync staging step — file exclusion (.git, .github, README.md, AGENTS.md, renovate.json) is now handled by the action's own exclude input.
  • The new action also leaves a small bookkeeping file (.sftp_upload_action_hashes) on the server to skip re-uploading unchanged files on future runs. Added it to the existing .htaccess deny rule alongside *.md/renovate.json so it isn't publicly servable.

No changes to which secrets are used (DEPLOY_HOST, DEPLOY_USERNAME, DEPLOY_PASSWORD, DEPLOY_PORT, DEPLOY_REMOTE_PATH).

Test plan

  • Push to main (or run the workflow manually) and confirm the deploy step completes without error
  • Verify https://openrtmp.org/.htaccess-dependent behavior works (e.g. the www → apex redirect, custom error pages) confirming .htaccess actually landed on the server this time
  • Confirm https://openrtmp.org/.sftp_upload_action_hashes is not publicly reachable

🤖 Generated with Claude Code

https://claude.ai/code/session_01CJGvJZXkV9CUHonq8wzEyt


Generated by Claude Code

Summary by CodeRabbit

  • Security

    • Blocked public access to the deployment tool’s metadata file, alongside existing protected repository files.
  • Deployment

    • Streamlined the deployment process while preserving the existing server credentials and destination settings.
    • Continued excluding repository and configuration files from uploaded content.

wlixcc/SFTP-Deploy-Action builds its upload command from an unquoted
shell glob (path/*), which never matches files starting with a dot -
so .htaccess was silently skipped on every deploy while everything
else uploaded fine.

Switch to wangyucode/sftp-upload-action, which walks the local
directory tree directly (Python os.walk) instead of glob-matching, so
dotfiles are included. Also hide its remote bookkeeping file
(.sftp_upload_action_hashes) via .htaccess, same as the other
repo-metadata files.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJGvJZXkV9CUHonq8wzEyt
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b4516133-12ff-4da8-856e-e467e48de35e

📥 Commits

Reviewing files that changed from the base of the PR and between ef5ae97 and dfc791a.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • .htaccess

📝 Walkthrough

Walkthrough

The deployment workflow now uploads the repository root with wangyucode/sftp-upload-action. The .htaccess rules also block access to .sftp_upload_action_hashes.

Changes

Deployment flow

Layer / File(s) Summary
Direct SFTP upload
.github/workflows/deploy.yml
Replaces payload staging and the previous SFTP action with a direct repository upload. The workflow preserves deployment secrets and defines repository exclusions.
Uploaded metadata protection
.htaccess
Blocks .sftp_upload_action_hashes alongside existing metadata files.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: claude

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/peaceful-cannon-88d4ye

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

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

@sonarqubecloud

Copy link
Copy Markdown

@AlexanderWagnerDev
AlexanderWagnerDev marked this pull request as ready for review September 12, 2026 23:05
@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_1d1b5d40-a9fb-48ca-b56a-649196bfca3b)

@AlexanderWagnerDev
AlexanderWagnerDev merged commit 5cd5a14 into main Sep 12, 2026
7 of 8 checks passed
@AlexanderWagnerDev
AlexanderWagnerDev deleted the claude/peaceful-cannon-88d4ye branch September 12, 2026 23:06
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.

2 participants