Merge pull request #171 from BRAVO68WEB/dependabot/npm_and_yarn/graph… #108
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
name: Deploy to Dev Server | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: 'just-a-placeholder-so-we-dont-get-errors' | |
- name: Adding Known Hosts | |
run: ssh-keyscan -p ${{ secrets.SERVER_SSH_PORT }} ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts | |
- name: Copy code to server | |
run: ssh -o StrictHostKeyChecking=no -p ${{ secrets.SERVER_SSH_PORT }} ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_IP }} "./shx-dev-deploy.sh" | |
- name: Sleep for 25 secs and Test Deployment | |
run: | | |
sleep 25 | |
curl --location --request POST ${{secrets.DEV_HOST_ADDR}}/apikey?masterkey=${{ secrets.MASTER_KEY }} |