-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (41 loc) · 1.73 KB
/
pr.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: client_test using docker
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# - name: login to docker
# run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: build docker test file for client
run: docker build ./client -t ishantgupta777/waves_client_test
- name: test docker file for client
run: docker run ishantgupta777/waves_client_test npm run test:ci
# - name: build docker prod file for client
# run: docker build ./client -t ishantgupta777/waves_client -f ./client/Dockerfile.prod
# - name: build docker prod file for server
# run: docker build ./server -t ishantgupta777/waves_server -f ./server/Dockerfile.prod
# - name: push to docker hub
# run: |
# docker push ishantgupta777/waves_client
# docker push ishantgupta777/waves_server
# - name: deploying to servers
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.MY_SERVER_HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.KEY }}
# port: ${{ secrets.PORT }}
# script: |
# rm -rf waves2020
# git clone [email protected]:ishantgupta777/waves2020.git
# cd waves2020
# docker kill $(docker ps -a -q)
# docker rm $(docker ps -a -q)
# docker pull ishantgupta777/waves_client
# docker pull ishantgupta777/waves_server
# docker-compose -f docker-compose.prod.yml up --build -d
# docker-compose pull
# docker-compose -f docker-compose.prod.yml up --build