make the key
This commit is contained in:
parent
9d6625dfc8
commit
46bd66cd54
|
@ -23,18 +23,21 @@ jobs:
|
|||
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 run build
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir /root/.ssh/
|
||||
mkdir -p /root/.ssh/
|
||||
touch /root/.ssh/config
|
||||
echo $SSH_KEY > /root/.ssh/id_stage.pub
|
||||
chmod 600 /root/.ssh/id_stage.pub
|
||||
cat >> /root/.ssh/config <<END
|
||||
Host staging
|
||||
HostName $SSH_HOST
|
||||
User $SSH_USER
|
||||
IdentityFile /root/.ssh/id_rsa
|
||||
IdentityFile /root/.ssh/id_stage.pub
|
||||
StrictHostKeyChecking no
|
||||
END
|
||||
env:
|
||||
SSH_USER: ubuntu
|
||||
SSH_HOST: 91.92.154.141
|
||||
SSS_KEY: ${{ secrets.STAGING_SSH_KEY }}
|
||||
- run: scp -vo StrictHostKeyChecking=no -r ${{ gitea.workspace }}/csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ staging:~/backend
|
||||
- run: scp -vo StrictHostKeyChecking=no -r ${{ gitea.workspace }}/typescript/frontend-marios2/* staging:~/frontend/
|
||||
- run: ssh -vo StrictHostKeyChecking=no staging 'sudo systemctl restart backend'
|
||||
|
|
Loading…
Reference in New Issue