Skip to content

Commit

Permalink
ci/cd (#131): restore cache before installation and building dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
navid-kalaei committed May 13, 2022
1 parent 0bb0081 commit e5676ee
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Install front-end dependancies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Install process manager
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn add pm2

- name: Cache yarn
uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand All @@ -45,8 +37,13 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Build front-end
run: yarn build:dev
- name: Install front-end dependancies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Install process manager
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn add pm2

- name: Cache NextJS
uses: actions/cache@v3
Expand All @@ -61,6 +58,9 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Build front-end
run: yarn build:dev

- name: Setup python
uses: actions/setup-python@v2

Expand Down

0 comments on commit e5676ee

Please sign in to comment.