Change deployment path to use temporary directory #19
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rdenadai/web.redecapivara.social!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rdenadai-patch-9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Updated deployment process to first copy files to a temporary directory before moving them to the final location.
Pull Request Overview
This PR modifies the deployment workflow to use a two-stage deployment process: first copying files to a temporary directory (
/tmp/web_deploy/) via rsync, then moving them to the final location (/pds/web/) via SSH with elevated privileges.Key Changes:
/pds/web/to/tmp/web_deploy/sudo cpTip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -47,4 +47,8 @@ jobs:- name: Deploy dist/ to VM:/pdsrun: |The
/tmp/web_deploy/directory may not exist on first deployment or after system reboot, causing rsync to fail. Add a step to create this directory first, or update the SSH command in the next step to includemkdir -p /tmp/web_deploy &&before the copy operation.@ -51,0 +51,4 @@- name: Move deployed files to final locationrun: |ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.VM_USER }}@${{ secrets.VM_IP }} "sudo cp -a /tmp/web_deploy/* /pds/web/"The
cpcommand copies contents but doesn't handle deletion of files that were removed from the source. The originalrsync --deletebehavior is lost. Consider usingrsync --deletein the final step as well, or addrm -rf /pds/web/* &&before the cp command to maintain the delete synchronization behavior.Using wildcard
*in the cp command will fail if/tmp/web_deploy/is empty or contains only hidden files (dotfiles). The command should copy the directory contents more reliably, for example:sudo rsync -a --delete /tmp/web_deploy/ /pds/web/