Skip to content

Merge pull request #103 from tukcomCD2024/test#59/set-backend-test #59

Merge pull request #103 from tukcomCD2024/test#59/set-backend-test

Merge pull request #103 from tukcomCD2024/test#59/set-backend-test #59

Workflow file for this run

name: server
env :
FIREBASE_KEY : ${{ secrets.FIREBASE_KEY }}
on:
workflow_dispatch:
push:
branches:
- develop
paths:
- "backend/**"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend/memetory
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name : injection-yml
run : echo -E "${{ secrets.DEV_YML }}" > ./src/main/resources/application-dev.yml
- name : injection-firebase
run : echo -E $FIREBASE_KEY > ./src/main/resources/firebase/firebase_key.json
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_ID }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Execute Gradle build and analyze
run: ./gradlew jib
- name: Run scripts in server
uses: appleboy/ssh-action@master
with:
key: ${{ secrets.KEY }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USER_NAME }}
script: ${{ secrets.SCRIPT }}