🐛Fix Batik-svg문자열 강제 인코딩 #90
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ "develop" ] # 나중에 main으로 변경 가능 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Make gradlew executable | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build -x test | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-jar | |
| path: build/libs/*.jar | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: app-jar | |
| path: . | |
| - name: Copy JAR to EC2 | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ${{ secrets.EC2_USER }} | |
| key: ${{ secrets.EC2_KEY }} | |
| source: "*.jar" | |
| target: "/home/ubuntu/back-end/" | |
| - name: Deploy to EC2 | |
| uses: appleboy/[email protected] | |
| # env: | |
| # APPLICATION_YML: ${{ secrets.APPLICATION_YML }} | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ${{ secrets.EC2_USER }} | |
| key: ${{ secrets.EC2_KEY }} | |
| script: | | |
| # Base64로 전달된 yml 디코딩 | |
| echo "${{ secrets.APPLICATION_YML }}" | base64 --decode > /home/ubuntu/back-end/application.yml | |
| # 배포 스크립트 실행 | |
| bash ~/back-end/deploy.sh | |
| - name: Restart Spring Boot service | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ${{ secrets.EC2_USER }} | |
| key: ${{ secrets.EC2_KEY }} | |
| script: | | |
| sudo systemctl daemon-reload | |
| sudo systemctl restart mathfusion | |
| sudo systemctl status mathfusion |