Skip to content

Commit

Permalink
add-server-deploy-workflow: add file
Browse files Browse the repository at this point in the history
  • Loading branch information
jdolkowski committed Jul 17, 2023
1 parent 15ef4cc commit f2b3feb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/core-mis-test-server-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CoreMIS Server Deployment
on:
push:
branches:
- develop

jobs:
rebuild-test-server:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.CORE_MIS_DEPLOYMENT_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.CORE_MIS_DEPLOYMENT_HOST }} >> ~/.ssh/known_hosts
env:
CORE_MIS_DEPLOYMENT_SSH_KEY: ${{ secrets.CORE_MIS_DEPLOYMENT_SSH_KEY }}
CORE_MIS_DEPLOYMENT_USER: ${{ secrets.CORE_MIS_DEPLOYMENT_USER }}
CORE_MIS_DEPLOYMENT_HOST: ${{ secrets.CORE_MIS_DEPLOYMENT_HOST }}

- name: Run Docker Compose
run: |
ssh -o StrictHostKeyChecking=no -T ${{ secrets.CORE_MIS_DEPLOYMENT_USER }}@${{ secrets.CORE_MIS_DEPLOYMENT_HOST }} -p 1022
ssh ${{ secrets.CORE_MIS_DEPLOYMENT_USER }}@${{ secrets.CORE_MIS_DEPLOYMENT_HOST }} -p 1022 << EOF
cd coreMIS/
docker-compose build backend gateway && docker-compose up -d
EOF

0 comments on commit f2b3feb

Please sign in to comment.