took out some sudo commands

This commit is contained in:
Kim 2023-11-06 14:01:40 +01:00
parent 916c311deb
commit 441bbaae9c
2 changed files with 7 additions and 6 deletions

View File

@ -28,7 +28,7 @@ jobs:
username: ubuntu
key: ${{ secrets.STAGING_SSH_KEY }}
source: "${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/"
target: "staging:~/backend"
target: "~/backend"
- name: Copy Frontend
uses: appleboy/scp-action@v0.1.4
@ -37,19 +37,16 @@ jobs:
username: ubuntu
key: ${{ secrets.STAGING_SSH_KEY }}
source: "${{ gitea.workspace }}/typescript/frontend-marios2/"
target: "staging:~/frontend"
target: "~/frontend"
- name: restart services
uses: appleboy/ssh-action@v0.1.4
with:
host: 91.92.154.141
username: ubuntu
# key_path: /root/.ssh/id_rsa
key: ${{ secrets.STAGING_SSH_KEY }}
script: |
sudo systemctl restart backend
sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/
sudo npm install -g serve
sudo ~/backend/Resources/deploy.sh
- run: echo " This job's status is ${{ job.status }}."

View File

@ -0,0 +1,4 @@
#!/bin/bash
sudo systemctl restart backend
sudo cp -rf ~/frontend/build/*
sudo npm install -g serve/var/www/html/monitor.innov.energy/html/