rsync and ssh into their own files
This commit is contained in:
parent
c0112a12e8
commit
37603e501e
|
@ -0,0 +1,7 @@
|
|||
#/bin/bash
|
||||
|
||||
rsync -av ${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ ubuntu@194.182.190.208:~/backend
|
||||
ssh ubuntu@194.182.190.208 'sudo systemctl restart backend'
|
||||
rsync -av ${{ gitea.workspace }}/typescript/frontend-marios2/* ubuntu@194.182.190.208:~/frontend/
|
||||
ssh ubuntu@194.182.190.208 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
|
||||
ssh ubuntu@194.182.190.208 'sudo npm install -g serve'
|
|
@ -0,0 +1,7 @@
|
|||
#/bin/bash
|
||||
|
||||
rsync -av ${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ ubuntu@91.92.154.141:~/backend
|
||||
ssh ubuntu@91.92.154.141 'sudo systemctl restart backend'
|
||||
rsync -av ${{ gitea.workspace }}/typescript/frontend-marios2/* ubuntu@91.92.154.141:~/frontend/
|
||||
ssh ubuntu@91.92.154.141 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
|
||||
ssh ubuntu@91.92.154.141 'sudo npm install -g serve'
|
|
@ -13,19 +13,15 @@ jobs:
|
|||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: echo " The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- name: Build backend
|
||||
uses: actions/setup-dotnet@v3
|
||||
- uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '7.0.x'
|
||||
- run: dotnet publish ${{ gitea.workspace }}/csharp/App/Backend/Backend.csproj -c Release -r linux-x64 --self-contained true -p:PublishTrimmed=false
|
||||
- uses: actions/setup-node@v3
|
||||
- run: |
|
||||
dotnet publish ${{ gitea.workspace }}/csharp/App/Backend/Backend.csproj -c Release -r linux-x64 --self-contained true -p:PublishTrimmed=false
|
||||
- name: Build frontend
|
||||
uses: actions/setup-node@v3
|
||||
- run: |
|
||||
npm run build
|
||||
- name: copy everything to Production
|
||||
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 install
|
||||
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 run build
|
||||
- name: copy everything to Prod
|
||||
run: |
|
||||
rsync -av ${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ ubuntu@194.182.190.208:~/backend
|
||||
ssh ubuntu@194.182.190.208'sudo systemctl restart backend'
|
||||
rsync -rv .* ubuntu@194.182.190.208:~/frontend/
|
||||
ssh ubuntu@194.182.190.208 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
|
||||
ssh ubuntu@194.182.190.208 'sudo npm install -g serve'
|
||||
${{ gitea.workspace }}/.gitea/Prod-deploy.sh
|
||||
- run: echo " This job's status is ${{ job.status }}."
|
|
@ -23,9 +23,5 @@ jobs:
|
|||
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 run build
|
||||
- name: copy everything to Stage
|
||||
run: |
|
||||
rsync -av ${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ ubuntu@91.92.154.141:~/backend
|
||||
ssh ubuntu@91.92.154.141 'sudo systemctl restart backend'
|
||||
rsync -rv ${{ gitea.workspace }}/typescript/frontend-marios2/* ubuntu@91.92.154.141:~/frontend/
|
||||
ssh ubuntu@91.92.154.141 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
|
||||
ssh ubuntu@91.92.154.141 'sudo npm install -g serve'
|
||||
${{ gitea.workspace }}/.gitea/Stage-deploy.sh
|
||||
- run: echo " This job's status is ${{ job.status }}."
|
Loading…
Reference in New Issue