[Feat/#180-new-relic] new relic 설정 (테스트) #86
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: dev server | |
env: | |
JASYPT_KEY: ${{ secrets.JASYPT_KEY }} | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: "corretto" | |
- name: Set up GCS Key file | |
id: gcs-key-file | |
uses: jsdaniell/[email protected] | |
with: | |
name: "gcp-img-role.json" | |
json: ${{ secrets.GCS_KEY }} | |
dir: './src/main/resources/static/' | |
- name: Set up Firebase Key file | |
id: firebase-key-file | |
uses: jsdaniell/[email protected] | |
with: | |
name: "firebase-adminsdk.json" | |
json: ${{ secrets.FIREBASE_KEY }} | |
dir: './src/main/resources/static/' | |
- name: Set up Apple Key file | |
run: echo "${{ secrets.APPLE_AUTH_KEY }}" > ./src/main/resources/static/AuthKey_ZJ4VQZNW7D.p8 | |
shell: bash | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
shell: bash | |
- name: Download New Relic | |
run: ./gradlew downloadNewrelic | |
shell: bash | |
- name: Unzip New Relic | |
run: ./gradlew unzipNewrelic | |
shell: bash | |
- name: Build with Gradle | |
run: ./gradlew clean build | |
shell: bash | |
- name: Login to DockerHub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_DEV_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_DEV_PWD }} | |
- name: Build and push Docker images | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKERHUB_DEV_USERNAME }}/pochak-dev | |
build-args: | | |
SPRING_PROFILES_ACTIVE=DEV | |
JASYPT_KEY=${{ secrets.JASYPT_KEY }} | |
- name: Execute remote ssh & Deploy Dev server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_DEV_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: sudo sh deploy.sh |