Skip to content

Commit

Permalink
Fix scp deploy (#121)
Browse files Browse the repository at this point in the history
* Fix scp-deploy.yml
  • Loading branch information
banterCZ authored Oct 16, 2023
1 parent 305733e commit 807c901
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/scp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,29 @@ jobs:
cache: maven
- name: Run Maven Package Step
run: |
mvn -B -U package
mvn -B -U package -Dmaven.test.skip=true
env:
INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }}
INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
- name: Retrieve the certificate and store it to a file
env:
SCP_CERTIFICATE: ${{ secrets.SCP_CERTIFICATE }}
- name: Set up SSH key
run: |
echo $SCP_CERTIFICATE > cert.pem
mkdir -p ~/.ssh
echo "${{ secrets.SCP_CERTIFICATE }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa ${{ secrets.SCP_HOST }} >> ~/.ssh/known_hosts
- name: Deploy enrollment-server.war
shell: bash
env:
SCP_USERNAME: ${{ secrets.SCP_USERNAME }}
SCP_HOST: ${{ secrets.SCP_HOST }}
run: |
scp -i cert.pem enrollment-server-wultra-*.war $SCP_USERNAME@$SCP_HOST:/opt/apache-tomcat/webapps/enrollment-server.war
scp -i ~/.ssh/id_rsa **/target/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
env:
SCP_USERNAME: ${{ secrets.SCP_USERNAME }}
SCP_HOST: ${{ secrets.SCP_HOST }}
run: |
scp -i cert.pem enrollment-server-onboarding-wultra-*.war $SCP_USERNAME@$SCP_HOST:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war
scp -i ~/.ssh/id_rsa **/target/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
env:
SCP_USERNAME: ${{ secrets.SCP_USERNAME }}
SCP_HOST: ${{ secrets.SCP_HOST }}
run: |
scp -i cert.pem enrollment-server-wultra-*.war $SCP_USERNAME@$SCP_HOST:/opt/apache-tomcat/webapps/enrollment-server-mock.war
scp -i ~/.ssh/id_rsa **/target/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
env:
SCP_USERNAME: ${{ secrets.SCP_USERNAME }}
SCP_HOST: ${{ secrets.SCP_HOST }}
run: |
scp -i cert.pem enrollment-server-onboarding-wultra-*.war $SCP_USERNAME@$SCP_HOST:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war
scp -i ~/.ssh/id_rsa **/target/enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war

0 comments on commit 807c901

Please sign in to comment.