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
|
npm --prefix ${{ gitea.workspace }}/typescript/frontend-marios2 run build
|
||||||
- name: Configure SSH
|
- name: Configure SSH
|
||||||
run: |
|
run: |
|
||||||
mkdir /root/.ssh/
|
mkdir -p /root/.ssh/
|
||||||
touch /root/.ssh/config
|
touch /root/.ssh/config
|
||||||
|
echo $SSH_KEY > /root/.ssh/id_stage.pub
|
||||||
|
chmod 600 /root/.ssh/id_stage.pub
|
||||||
cat >> /root/.ssh/config <<END
|
cat >> /root/.ssh/config <<END
|
||||||
Host staging
|
Host staging
|
||||||
HostName $SSH_HOST
|
HostName $SSH_HOST
|
||||||
User $SSH_USER
|
User $SSH_USER
|
||||||
IdentityFile /root/.ssh/id_rsa
|
IdentityFile /root/.ssh/id_stage.pub
|
||||||
StrictHostKeyChecking no
|
StrictHostKeyChecking no
|
||||||
END
|
END
|
||||||
env:
|
env:
|
||||||
SSH_USER: ubuntu
|
SSH_USER: ubuntu
|
||||||
SSH_HOST: 91.92.154.141
|
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 }}/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: scp -vo StrictHostKeyChecking=no -r ${{ gitea.workspace }}/typescript/frontend-marios2/* staging:~/frontend/
|
||||||
- run: ssh -vo StrictHostKeyChecking=no staging 'sudo systemctl restart backend'
|
- run: ssh -vo StrictHostKeyChecking=no staging 'sudo systemctl restart backend'
|
||||||
|
|
Loading…
Reference in New Issue