diff --git a/.github/workflows/scp-deploy.yml b/.github/workflows/scp-deploy.yml index 66c16a3b..54691e56 100644 --- a/.github/workflows/scp-deploy.yml +++ b/.github/workflows/scp-deploy.yml @@ -23,22 +23,23 @@ jobs: env: INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }} INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }} - - name: Retrieve the certificate and store it to a file + - name: Setup SSH Keys and known_hosts run: | - echo "${{ secrets.SCP_CERTIFICATE }}" > cert.pem + ssh-agent -a /tmp/ssh_agent.sock > /dev/null + ssh-add - <<< "${{ secrets.SCP_CERTIFICATE }}" - name: Deploy enrollment-server.war shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war + scp -o 'StrictHostKeyChecking no' enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war - name: Deploy enrollment-server-onboarding.war shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war + scp -o 'StrictHostKeyChecking no' enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war - name: Deploy enrollment-server.war mock shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-mock.war + scp -o 'StrictHostKeyChecking no' enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-mock.war - name: Deploy enrollment-server-onboarding.war mock shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war + scp -o 'StrictHostKeyChecking no' enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war