Skip to content

fix: 컨플릭트 해결 #13

fix: 컨플릭트 해결

fix: 컨플릭트 해결 #13

name: deploy
on:
push:
branches: [ "release/backend" ]
paths:
- "backend/**"
jobs:
build-a:
runs-on: self-hosted-prod-a
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "corretto"
- name: create-json
uses: jsdaniell/[email protected]
with:
name: "firebase-friendogly-private-key.json"
json: ${{ secrets.FIREBASE_FRIENDOGLY_PRIVATE_KEY }}
dir: './backend/src/main/resources/'
- name: Grant execute permission for gradlew
working-directory: ./backend
run: chmod +x gradlew
- name: Build project using Gradle
working-directory: ./backend
run: ./gradlew build
deploy-a:
needs: build-a
runs-on: self-hosted-prod-a
steps:
- name: Change permission
run: |
sudo chown -R ubuntu:ubuntu /home/ubuntu/actions-runner/_work/2024-friendogly
- name: Deploy prod-a
run: |
sudo chmod +x /home/ubuntu/deploy/deploy.sh
sudo /home/ubuntu/deploy/deploy.sh
build-b:
runs-on: self-hosted-prod-b
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "corretto"
- name: create-json
uses: jsdaniell/[email protected]
with:
name: "firebase-friendogly-private-key.json"
json: ${{ secrets.FIREBASE_FRIENDOGLY_PRIVATE_KEY }}
dir: './backend/src/main/resources/'
- name: Grant execute permission for gradlew
working-directory: ./backend
run: chmod +x gradlew
- name: Build project using Gradle
working-directory: ./backend
run: ./gradlew build
deploy-b:
needs: build-b
runs-on: self-hosted-prod-b
steps:
- name: Change permission
run: |
sudo chown -R ubuntu:ubuntu /home/ubuntu/actions-runner/_work/2024-friendogly
- name: Deploy prod-b
run: |
sudo chmod +x /home/ubuntu/deploy/deploy.sh
sudo /home/ubuntu/deploy/deploy.sh