[Chore]: open-in-view 옵션 false 추가. #144
This file contains 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: LinkHub CI/CD | |
on: | |
push: | |
branches: | |
- test/load | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build linkhub.jar | |
run: ./gradlew build -x test | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
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.LINKHUB_IMAGE }}:application-v${GITHUB_RUN_NUMBER} . | |
docker tag ${{ secrets.LINKHUB_IMAGE }}:application-v${GITHUB_RUN_NUMBER} ${{ secrets.LINKHUB_IMAGE }}:latest | |
docker push ${{ secrets.LINKHUB_IMAGE }}:application-v${GITHUB_RUN_NUMBER} | |
docker push ${{ secrets.LINKHUB_IMAGE }}:latest | |
- name: Deploy to EC2 | |
uses: appleboy/ssh-action@v0.1.10 | |
with: | |
host: ${{ secrets.TEST_SERVER_HOST }} | |
username: ${{ secrets.TEST_SERVER_USERNAME }} | |
key: ${{ secrets.TEST_SERVER_KEY }} | |
script: | | |
cd LinkHub-BE | |
chmod +x deploy.sh | |
./deploy.sh |