forked from tekdi/ubi-vc-issuance-mw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7bc5f2
commit 8cba4d0
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Deploy to Issuance to UAT | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
Deploy: | ||
name: Deploy to UAT | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Deploy to UAT | ||
uses: easingthemes/ssh-deploy@main | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY_UAT }} | ||
REMOTE_HOST: ${{ secrets.HOST_NAME_UAT }} | ||
REMOTE_USER: ${{ secrets.USERNAME_UAT }} | ||
|
||
|
||
- name: Set up SSH key | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_KEY_UAT }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
# Add the SSH key to the known_hosts file (replace hostname with your actual hostname) | ||
ssh-keyscan -H ${{ secrets.HOST_NAME_UAT}} >> ~/.ssh/known_hosts | ||
sudo apt-get install sshpass | ||
- name: Deploy to server | ||
run: | | ||
sshpass -p '${{ secrets.SSH_KEY_UAT }}' ssh -v -o StrictHostKeyChecking=no ${{ secrets.USERNAME_UAT }}@${{ secrets.HOST_NAME_UAT }} <<'ENDSSH' | ||
cd ${{ secrets.TARGET_UAT_DIR }} | ||
./deploy.sh | ||
ENDSSH |