rewrote ssh in deploy

This commit is contained in:
Kim 2023-10-30 09:40:51 +01:00
parent bd4d324033
commit 505bf3bce1
1 changed files with 17 additions and 5 deletions

View File

@ -21,9 +21,21 @@ jobs:
- run: | - run: |
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 install npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 install
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 run build 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 - name: Configure SSH
- run: scp -vo StrictHostKeyChecking=no -r ${{ gitea.workspace }}/typescript/frontend-marios2/* ubuntu@91.92.154.141:~/frontend/ run: |
- run: ssh -vo StrictHostKeyChecking=no ubuntu@91.92.154.141 'sudo systemctl restart backend' Host staging
- run: ssh -vo StrictHostKeyChecking=no ubuntu@91.92.154.141 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/' HostName $SSH_HOST
- run: ssh -vo StrictHostKeyChecking=no ubuntu@91.92.154.141 'sudo npm install -g serve' 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 }}." - run: echo " This job's status is ${{ job.status }}."