[FE] 첫 로드 후 조회 요청 없이 채팅을 치면 조회가 안되는 버그 #169
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 deploy dev | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: ["develop"] | |
paths: | |
- "frontend/**" | |
permissions: | |
contents: read | |
jobs: | |
build-and-upload: | |
# if: github.event.pull_request.merged == true | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- name: Setup Repository | |
uses: actions/checkout@v4 | |
- name: Setup node with cache | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Setup environment variables | |
run: | | |
echo "REACT_APP_BASE_URL=${{ secrets.REACT_APP_DEV_BASE_URL }}" >> .env | |
- name: Install dependencies | |
run: npm ci | |
- name: Build App | |
run: npm run build:dev | |
- name: Upload frontend build file to artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FrontendApplication | |
path: frontend/dist | |
deploy: | |
needs: build-and-upload | |
runs-on: self-hosted | |
env: | |
CLOUD_FRONT_DISTRIBUTION_ID: ${{ secrets.CLOUD_FRONT_DEV_DISTRIBUTION_ID}} | |
steps: | |
- name: Remove previous version app | |
working-directory: frontend/dev/ | |
run: rm -rf dist | |
- name: Download build file from artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: FrontendApplication | |
path: frontend/dev/dist | |
- name: Deploy DEV frontend | |
working-directory: frontend/dev/ | |
run: | | |
rm -f /home/ubuntu/team-by-team/frontend/backup/* | |
mv /home/ubuntu/team-by-team/frontend/www/dist/* /home/ubuntu/team-by-team/frontend/backup/ | |
mv ./dist/* /home/ubuntu/team-by-team/frontend/www/dist/ | |
aws s3 sync /home/ubuntu/team-by-team/frontend/www/dist/ s3://team-by-team-static-resource/dev/front --delete | |
aws cloudfront create-invalidation --distribution-id "$CLOUD_FRONT_DISTRIBUTION_ID" --paths "/*" |