added users pages #13
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: Deploy to Server | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install SSH and SCP | |
run: sudo apt-get update && sudo apt-get install -y openssh-client | |
- name: Copy files via SCP | |
env: | |
SSHPASS: ${{ secrets.ROOT_SSH_PASSWORD }} | |
run: | | |
sudo apt-get install -y sshpass | |
sshpass -e scp -o StrictHostKeyChecking=no -r ./* root@${{ secrets.SERVER_IP }}:/home/ppl_site | |
- name: Execute remote commands | |
env: | |
SSHPASS: ${{ secrets.ROOT_SSH_PASSWORD }} | |
run: | | |
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ secrets.SERVER_IP }} << 'EOF' | |
cd /home/ppl_site | |
npm run build | |
systemctl restart ppl_site | |
EOF |