[#127] 배포 자동화 구현 #3
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: DEV CI | |
on: | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory-spring: main | |
working-directory-nextjs: server | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies (npm 의존성 설치) | |
run: npm install | |
working-directory: ${{ env.working-directory-nextjs }} | |
- name: resources 폴더 내 application-secret.properties 파일 생성 | |
run: | | |
mkdir -p src/main/resources | |
echo "${{ secrets.APPLICATION_SECRET }}" > src/main/resources/application-secret.properties | |
working-directory: ${{ env.working-directory-spring }} | |
- name: nextjs 폴더 내 .dev.env 파일 생성 | |
run: | | |
echo "${{ secrets.APPLICATION_SECRET }}" > .dev.env | |
working-directory: ${{ env.working-directory-nextjs }} | |
- name: Build (Spring) | |
run: | | |
chmod +x gradlew | |
./gradlew clean build | |
working-directory: ${{ env.working-directory-spring }} | |
shell: bash | |
- name: Build (nextjs) | |
run: npm run build | |
working-directory: ${{ env.working-directory-nextjs }} |