isQuizAvailable.get(quizId) -> get(quizId-1) hotfix #111
Workflow file for this run
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: Deploy To EC2 | |
on: | |
push: | |
branches: [ "main" , "hotfix"] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Github Repository 파일 불러오기 | |
uses: actions/checkout@v4 | |
- name: JDK 17버전 설치 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: application.yml 파일 만들기 | |
run: | | |
mkdir -p ./src/main/resources | |
echo "${{ secrets.APPLICATION_PROPERTIES }}" > ./src/main/resources/application.yml | |
- name: certificate.p12 파일 만들기 | |
run: | | |
echo "${{ secrets.SSL_CERTIFICATE }}" | base64 -d > ./src/main/resources/certificate.p12 | |
- name: 테스트 및 빌드하기 | |
run: ./gradlew clean build -x test | |
- name: 빌드된 파일 이름 변경하기 | |
run: mv ./build/libs/*SNAPSHOT.jar ./app.jar | |
- name: SCP로 EC2에 빌드된 파일 전송하기 | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
key: ${{ secrets.EC2_PRIVATE_KEY }} | |
source: app.jar | |
target: /home/ubuntu/event-page | |
- name: SSH로 EC2에 접속하기 | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
key: ${{ secrets.EC2_PRIVATE_KEY }} | |
script_stop: true | |
script: | | |
cd /home/ubuntu/event-page | |
./exec.sh |