File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy on EC2-Instance
2+
3+ on :
4+ workflow_run :
5+ workflows : ["Docker Image CI"]
6+ types :
7+ - completed
8+
9+ jobs :
10+ deploy :
11+ name : Deploy to EC2
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+
16+ - name : Deploy via SSH
17+ uses : appleboy/ssh-action@v0.1.10
18+ with :
19+ host : ${{secrets.HOST_DNS}}
20+ username : ${{secrets.EC2_USER}}
21+ key : ${{secrets.EC2_SSH_KEY}}
22+
Original file line number Diff line number Diff line change 1+ name : Docker Image CI
2+
3+ on :
4+ push :
5+ branches : ["deploy"]
6+
7+ jobs :
8+
9+ build :
10+
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - users : actions/checkout@v3
15+ - name : Login Dockerhub
16+ env :
17+ DOCKER_USERNAME : ${{secrets.DOCKER_USERNAME}}
18+ DOCKER_PASSWORD : ${{secrets.DOCKER_PASSWORD}}
19+ run : docker login - u $DOCKER_USERNAME -p $DOCKER_PASSWORD
20+
21+ - name : Build the Docker image
22+ run : docker build -t quiz-slayer-env Frontend/.
23+ - name : Push Docker image
24+ run : docker push thomastejedor/quiz-slayer-env:latest
25+
You can’t perform that action at this time.
0 commit comments