Skip to content

fix: update series info api when update memo #405

fix: update series info api when update memo

fix: update series info api when update memo #405

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI/CD with Gradle In Develope Branch
on:
push:
branches: [ "develope" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Add properties
run: echo "${{ secrets.APPLICATION_DEV }}" > ./src/main/resources/application.yml
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.5.1
arguments: build -x test
- name: Docker build
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_DEV_REPO }} .
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_DEV_REPO }}
- name: Deploy to dev
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_DEV }}
username: ec2-user
key: ${{ secrets.PRIVATE_KEY }}
script: |
docker stop backend
docker rm backend
docker rmi ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_DEV_REPO }}
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_DEV_REPO }}
docker run -dp 8080:8080 --name=backend ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKER_DEV_REPO }}
- name: Notify Slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#00FF00'
SLACK_TITLE: 'Build and Deploy'
SLACK_TEXT: 'Backend repository build and deployment process has been completed successfully.'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}