rewrote ssh in deploy
This commit is contained in:
parent
bd4d324033
commit
505bf3bce1
|
@ -21,9 +21,21 @@ jobs:
|
|||
- run: |
|
||||
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 install
|
||||
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 run build
|
||||
- run: scp -vo StrictHostKeyChecking=no -r ${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ ubuntu@91.92.154.141:~/backend
|
||||
- run: scp -vo StrictHostKeyChecking=no -r ${{ gitea.workspace }}/typescript/frontend-marios2/* ubuntu@91.92.154.141:~/frontend/
|
||||
- run: ssh -vo StrictHostKeyChecking=no ubuntu@91.92.154.141 'sudo systemctl restart backend'
|
||||
- run: ssh -vo StrictHostKeyChecking=no ubuntu@91.92.154.141 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
|
||||
- run: ssh -vo StrictHostKeyChecking=no ubuntu@91.92.154.141 'sudo npm install -g serve'
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
Host staging
|
||||
HostName $SSH_HOST
|
||||
User $SSH_USER
|
||||
IdentityFile /root/.ssh/id_stage
|
||||
StrictHostKeyChecking no
|
||||
END
|
||||
env:
|
||||
SSH_USER: ubuntu
|
||||
SSH_HOST: 91.92.154.141
|
||||
- run: cd ${{ gitea.workspace }}
|
||||
- run: scp -vo StrictHostKeyChecking=no -r ./csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ staging:~/backend
|
||||
- run: scp -vo StrictHostKeyChecking=no -r ./typescript/frontend-marios2/* staging:~/frontend/
|
||||
- run: ssh -vo StrictHostKeyChecking=no staging 'sudo systemctl restart backend'
|
||||
- run: ssh -vo StrictHostKeyChecking=no staging 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
|
||||
- run: ssh -vo StrictHostKeyChecking=no staging 'sudo npm install -g serve'
|
||||
- run: echo " This job's status is ${{ job.status }}."
|
Loading…
Reference in New Issue