From 1d8206fbd3cf7f888ee4a563b81d65c9f3bfafa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=ED=98=9C=EB=A0=B9?= Date: Fri, 6 Oct 2023 17:13:44 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=ED=94=84=EB=A1=A0=ED=8A=B8=EC=97=94?= =?UTF-8?q?=EB=93=9C=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0?= =?UTF-8?q?=EC=97=90=20=EC=BA=90=EC=8B=9C=EC=A0=81=EC=9A=A9=20(#470)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore/#469: 프론트엔드 프로젝트 배포 워크플로우에 캐시 적용 * chore/#469: 작업 실행 조건 수정 --- .github/workflows/frontend-deploy-dev.yml | 25 +++++++++++++++++++--- .github/workflows/frontend-deploy-prod.yml | 25 +++++++++++++++++++--- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/.github/workflows/frontend-deploy-dev.yml b/.github/workflows/frontend-deploy-dev.yml index faeedacbe..22dd7f7d2 100644 --- a/.github/workflows/frontend-deploy-dev.yml +++ b/.github/workflows/frontend-deploy-dev.yml @@ -2,8 +2,11 @@ name: Frontend Deploy to Dev on: push: - branches: [develop] - paths: frontend/** + branches: + - develop + paths: + - frontend/** + - .github/** jobs: build-dockerfile: @@ -18,8 +21,24 @@ jobs: with: node-version: '18.x' + - name: Cache Yarn global cache + uses: actions/cache@v3 + with: + path: '**/.yarn' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Cache Yarn project cache + uses: actions/cache@v3 + with: + path: '**/.yarn/cache' + key: ${{ runner.os }}-yarn-project-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-project- + - name: Install dependencies - run: yarn + run: yarn install --immutable - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/frontend-deploy-prod.yml b/.github/workflows/frontend-deploy-prod.yml index 07a457806..39d02463a 100644 --- a/.github/workflows/frontend-deploy-prod.yml +++ b/.github/workflows/frontend-deploy-prod.yml @@ -2,8 +2,11 @@ name: Frontend Deploy to Prod on: push: - branches: [main] - paths: frontend/** + branches: + - main + paths: + - frontend/** + - .github/** jobs: build-dockerfile: @@ -18,8 +21,24 @@ jobs: with: node-version: '18.x' + - name: Cache Yarn global cache + uses: actions/cache@v3 + with: + path: '**/.yarn' + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Cache Yarn project cache + uses: actions/cache@v3 + with: + path: '**/.yarn/cache' + key: ${{ runner.os }}-yarn-project-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-project- + - name: Install dependencies - run: yarn + run: yarn install --immutable - name: Set up QEMU uses: docker/setup-qemu-action@v2