Skip to content

Commit

Permalink
ci: develop 브랜치로 frontend 이하 경로에서 PR이 올라올 때 CI가 실행되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ImxYJL committed Jul 24, 2024
1 parent 4f21be9 commit 9034df0
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
name: Build test with Webpack
on:
push:
branches:
- develop
- fe/ci/85-build-ci
#paths:
# - "frontend/**"
pull_request:
branches:
- develop
Expand All @@ -16,7 +10,7 @@ permissions:
contents: read
pages: write
id-token: write
concurrency: # action 도중 새 PR이 올라오면 기존 action 취소
concurrency: # NOTE: action 도중 새 PR이 올라오면 기존 action 취소
group: "ci-group"
cancel-in-progress: true
jobs:
Expand All @@ -26,29 +20,29 @@ jobs:
- name: Checkout to current repository
uses: actions/checkout@v4

- name: Change to frontend directory
run: cd frontend

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: ./frontend/yarn.lock
cache-dependency-path: yarn.lock

- name: Create .env file
run: echo "API_BASE_URL=${{ secrets.API_BASE_URL }}" > ./frontend/.env
run: echo "API_BASE_URL=${{ secrets.API_BASE_URL }}" > .env

- name: Set environment file permissions
run: chmod 644 ./frontend/.env
run: chmod 644 .env

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: frontend

- name: Run tests
run: yarn test
working-directory: frontend

- name: Build
run: yarn build
env:
API_BASE_URL: ${{ secrets.API_BASE_URL }}
working-directory: frontend

0 comments on commit 9034df0

Please sign in to comment.