generated from BRAVO68WEB/typescript-express-hasura-pgsql-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (24 loc) · 1.02 KB
/
deploy-docker-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 }}