refactor(env variables)!: UBS_PORT changed by USB_PORT #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UBS Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Deploy to VPS via SSH | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.VPS_IP }} | |
username: ${{ secrets.VPS_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd /var/www/ubs | |
sudo git stash | |
sudo git pull origin main | |
sudo git stash pop | |
sudo systemctl stop ubs | |
sudo rm main | |
sudo go build main.go | |
sudo systemctl start ubs |