Merge pull request #375 from Quickchive/feat/change-swagger-condition #141
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: Docker Image CI && Deploy to EC2 for Test Server | |
on: | |
push: | |
branches: ['release/**', develop] | |
jobs: | |
job1: | |
name: Docker Image CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to DockerHub | |
uses: docker/[email protected] | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{secrets.DOCKERHUB_TOKEN}} | |
- name: Build and push Docker images | |
uses: docker/[email protected] | |
with: | |
context: . | |
tags: quickarchive/quickarchive_api:test | |
push: true | |
job2: | |
needs: job1 | |
name: Deploy to EC2 | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ubuntu | |
key: ${{ secrets.KEY_PAIR }} | |
script: | | |
sh /home/ubuntu/actions-runner/deploy_test_server.sh |