Skip to content

Merge pull request #373 from Quickchive/feat/change-category-to-root-… #140

Merge pull request #373 from Quickchive/feat/change-category-to-root-…

Merge pull request #373 from Quickchive/feat/change-category-to-root-… #140

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