Skip to content

Commit

Permalink
[Feat] CD
Browse files Browse the repository at this point in the history
beanstalk
  • Loading branch information
ks1ksi committed Aug 31, 2023
1 parent a76be9e commit 1947ac1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy Dev

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash

- name: Build with Gradle
run: ./gradlew clean build
shell: bash

- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

- name: Generate deployment package # (1)
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cp Procfile deploy/Procfile
cp -r .ebextensions deploy/.ebextensions
cp -r .platform deploy/.platform
cd deploy && zip -r deploy.zip .
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: c-campus-backend
environment_name: C-campus-backend-env
version_label: github-action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
1 change: 1 addition & 0 deletions .platform/nginx/client.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client_max_body_size 100M;
1 change: 1 addition & 0 deletions .platform/nginx/proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
proxy_intercept_errors off;

0 comments on commit 1947ac1

Please sign in to comment.