[FE] 하루일정모달의 달이 실제보다 하나 적은 버그 픽스 #21
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: frontend-cd | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: ['develop'] | |
paths: | |
- 'frontend/**' | |
defaults: | |
run: | |
working-directory: frontend | |
permissions: | |
contents: read | |
jobs: | |
build-and-upload: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup Repository | |
uses: actions/checkout@v3 | |
- name: Setup node with cache | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Setup environment variables | |
run: | | |
echo "REACT_APP_ACCESS_TOKEN=${{ secrets.REACT_APP_ACCESS_TOKEN }}" >> .env | |
- name: Install dependencies | |
run: npm ci | |
- name: Build App | |
run: npm run build | |
- name: Upload frontend build file to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: FrontendApplication | |
path: frontend/dist | |
deploy: | |
needs: build-and-upload | |
runs-on: self-hosted | |
env: | |
DEV_DEPLOY_SCRIPT: ${{ secrets.DEV_FRONT_DEPLOY_SCRIPT }} | |
steps: | |
- name: Remove previous version app | |
working-directory: ./frontend/dev/ | |
run: rm -rf dist | |
- name: Download build file from artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: FrontendApplication | |
path: frontend/dev/dist | |
- name: Deploy to WAS | |
working-directory: ./frontend/dev/ | |
run: | | |
echo "$DEV_DEPLOY_SCRIPT" > dev-deploy.sh | |
chmod 700 dev-deploy.sh | |
./dev-deploy.sh |