Design: 메인 페이지 이미지 최적화 #30
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: CI/CD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install --force | |
- name: .env setting | |
run: | | |
echo "REACT_APP_API_URL=$REACT_APP_API_URL" >> .env | |
env: | |
REACT_APP_API_URL: ${{ secrets.REACT_APP_API_URL }} | |
- name: Test | |
run: npm run test | |
- name: Build | |
run: npm run build | |
- run: mv default.conf ~/etc/nginx/conf.d/ | |
- run: docker stop nginx; docker start nginx | |
- name: Notify Deploy Job Done | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: frontend | |
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took | |
if_mention: failure,cancelled | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: always() |