Skip to content

Fix : 일지가져오기 버그 수정 #53

Fix : 일지가져오기 버그 수정

Fix : 일지가져오기 버그 수정 #53

Workflow file for this run

name: CD
on:
push:
branches: [main]
jobs:
deploy:
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: Create application.properties
run: |
echo "${{ secrets.APPLICATION }}" | base64 --decode > ./src/main/resources/application.yml
echo "${{ secrets.APPLICATION_DEV }}" | base64 --decode > ./src/main/resources/application-dev.yml
echo "${{ secrets.APPLICATION_OAUTH }}" | base64 --decode > ./src/main/resources/application-oauth.yml
echo "${{ secrets.FIREBASE_SDK }}" | base64 --decode > ./src/main/resources/daitgym-firebase-sdk.json
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build without Test in Gradle
run: ./gradlew build -x test
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/ggg:latest
- name: Zip the docker-compose file
run: zip -j deployment docker-compose.yml
- name: Deploy to Elastic Beanstalk
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: OGJG
environment_name: OGJG-env
version_label: OGJG_Deploy-${{ github.SHA }}
region: ${{ secrets.AWS_REGION }}
deployment_package: deployment.zip
use_existing_version_if_available: true
wait_for_environment_recovery: 180