- Assuming you followed deployment key setup in Cloning
- If you use a fork, replace 'mhoek2' in the following snippets with your username
Updating
Updating (public repository)
- Updating repository using Git CLI
# cd to the root of the application cd /vlam git pull
Using package
Updating (private repository)
- Create a update.sh file
# dedicated server: # cd to the root of the application. cd /var/www/html/vlam # or for docker: cd /vlam sudo nano update.sh
- Write to update.sh
#!/bin/bash # # Check if ssh-agent is running if [ -z "$SSH_AUTH_SOCK" ]; then echo "Starting ssh-agent..." eval "$(ssh-agent -s)" fi # Check if the key is already added if ! ssh-add -l | grep -q "vlm-deploy"; then echo "Adding SSH key..." ssh-add ~/.ssh/vlm-deploy else echo "SSH key already added." fi # Update the repo git pull git@github.com:mhoek2/vlam.git
- Make update.sh executable
sudo chmod +x update.sh
- Run update.sh
./update.sh
Notes
- If changes were made to .env which prevents pulling:
# export changes git diff > changes.log # restore to original git restore .env # pull git pull # restore git restore changes.log