Repository navigation
Merge pull request #16 from 9ITHON/ci/2 #1
This file contains hidden or 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: RoomGenie Deploy | |
| # AWS 서버 복구 후 활성화 | |
| # 필요한 시크릿: AWS_ACTION_ACCESS_KEY_ID, AWS_ACTION_SECRET_ACCESS_KEY | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build | |
| run: ./gradlew clean :demo-api:bootJar -x test -x asciidoctor | |
| - name: Generate deployment package | |
| run: | | |
| mkdir -p deploy | |
| cp demo-api/build/libs/*.jar deploy/application.jar | |
| cp Procfile deploy/Procfile | |
| cp -r .ebextensions-dev deploy/.ebextensions | |
| cp -r .platform deploy/.platform | |
| cd deploy && zip -r deploy.zip . | |
| - name: Beanstalk Deploy | |
| uses: einaregilsson/beanstalk-deploy@v22 | |
| with: | |
| aws_access_key: ${{ secrets.AWS_ACTION_ACCESS_KEY_ID }} | |
| aws_secret_key: ${{ secrets.AWS_ACTION_SECRET_ACCESS_KEY }} | |
| application_name: roomgenie1-dev | |
| environment_name: Roomgenie1-dev-env | |
| version_label: github-action-${{ github.run_number }}-${{ github.sha }} | |
| region: ap-northeast-2 | |
| deployment_package: deploy/deploy.zip | |
| wait_for_deployment: false |