[TB-20] 영수증 상세 조회 및 목록 조회 경로 수정 (#25) #37
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: Deploy to AWS | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Ensure gradlew is executable | |
| run: | | |
| if [ ! -x ./gradlew ]; then chmod +x gradlew; fi | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Create application.yml | |
| run: | | |
| mkdir -p src/main/resources | |
| echo "${{ secrets.APPLICATION_YML }}" > src/main/resources/application.yml | |
| - name: Build Project with Gradle | |
| run: ./gradlew clean build -x test | |
| - name: Copy JAR to Docker build context | |
| run: cp build/libs/ClubAccount-BE-0.0.1-SNAPSHOT.jar app.jar | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and Push Docker Image | |
| run: | | |
| docker build -t ${{ secrets.DOCKER_USERNAME }}/thinkboo-backend-app:latest . | |
| docker push ${{ secrets.DOCKER_USERNAME }}/thinkboo-backend-app:latest | |
| - name: Upload Deploy Script to EC2 | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.AWS_HOST }} | |
| username: ${{ secrets.AWS_USER }} | |
| key: ${{ secrets.AWS_PRIVATE_KEY }} | |
| source: "./infra/deploy/scripts/deploy.sh" | |
| target: "/home/ubuntu/" | |
| strip_components: 4 | |
| - name: Create .env file | |
| run: | | |
| echo "${{ secrets.ENV_FILE }}" > .env | |
| - name: Upload .env to EC2 | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.AWS_HOST }} | |
| username: ${{ secrets.AWS_USER }} | |
| key: ${{ secrets.AWS_PRIVATE_KEY }} | |
| source: ".env" | |
| target: "/home/ubuntu/" | |
| - name: Upload docker-compose.yml to EC2 | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.AWS_HOST }} | |
| username: ${{ secrets.AWS_USER }} | |
| key: ${{ secrets.AWS_PRIVATE_KEY }} | |
| source: "./infra/deploy/docker-compose.yml" | |
| target: "/home/ubuntu/" | |
| strip_components: 3 | |
| - name: Deploy to AWS Server | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.AWS_HOST }} | |
| username: ${{ secrets.AWS_USER }} | |
| key: ${{ secrets.AWS_PRIVATE_KEY }} | |
| script: | | |
| cd /home/ubuntu | |
| chmod +x deploy.sh | |
| ls -l deploy.sh | |
| ./deploy.sh |