Skip to content

ci: 읽기 권한을 명시적으로 주고 테스트 #14

ci: 읽기 권한을 명시적으로 주고 테스트

ci: 읽기 권한을 명시적으로 주고 테스트 #14

Workflow file for this run

name: Build test with Webpack
on:
push:
branches:
- develop
- fe/ci/85-build-ci
#paths:
# - "frontend/**"
pull_request:
branches:
- develop
paths:
- "frontend/**"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency: # action 도중 새 PR이 올라오면 기존 action 취소
group: "ci-group"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set environment file permissions
run: chmod 644 ./frontend/.env
- name: Checkout to current repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: ./frontend/yarn.lock
- 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
# 아티팩트를 사용해 배포 파일 저장
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: production-artifacts
path: ./frontend/dist