Skip to content

feat: 토스트 컴포넌트 구현 #3

feat: 토스트 컴포넌트 구현

feat: 토스트 컴포넌트 구현 #3

Workflow file for this run

name: NodeJS with Webpack
on:
push:
paths: 'frontend/**'
pull_request:
branches:
- develop
- main
paths: 'frontend/**'
defaults:
run:
working-directory: frontend
permissions:
pull-requests: write
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Repository
uses: actions/checkout@v3
- name : Set up Node 18.16.0
uses: actions/setup-node@v3
with:
node-version: 18.16.0
cache: npm
- name: Cache node_modules
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm clean install
run: npm ci
if: steps.cache.outputs.cache-hit != 'true'
- name: npm build
continue-on-error: true
run: npm run build
- name: storyBook build
run: npm run build-storybook
if: always()
- name: CI Results
uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const commentBody = job.status === 'success' ?
':heavy_check_mark: Build succeeded for this Pull Request.'
: ':warning: 배포에 실패했습니다. 스토리북 혹은 빌드 위치를 확인해주세요';
github.issues.createComment({
issue_number: ${{ github.event.number }},
owner: woowacourse-teams,
repo: 2023-pium,
body: commentBody
})
if: always()
- name: notificate on slack if build failed
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: 프론트 빌드 결과 알림
fields: repo, message, commit, author, action, eventName, ref, workflow, job, took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()