Skip to content

Commit

Permalink
chore: 프론트엔드 프로젝트 배포 워크플로우에 캐시적용 (#470)
Browse files Browse the repository at this point in the history
* chore/#469: 프론트엔드 프로젝트 배포 워크플로우에 캐시 적용

* chore/#469: 작업 실행 조건 수정
  • Loading branch information
HyeryongChoi authored Oct 6, 2023
1 parent 1cc0c7c commit 1d8206f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/frontend-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Frontend Deploy to Dev

on:
push:
branches: [develop]
paths: frontend/**
branches:
- develop
paths:
- frontend/**
- .github/**

jobs:
build-dockerfile:
Expand All @@ -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
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/frontend-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Frontend Deploy to Prod

on:
push:
branches: [main]
paths: frontend/**
branches:
- main
paths:
- frontend/**
- .github/**

jobs:
build-dockerfile:
Expand All @@ -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
Expand Down

0 comments on commit 1d8206f

Please sign in to comment.