forked from mdn/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cache node_modules the same in all workflows (mdn#3077)
- Loading branch information
Showing
2 changed files
with
18 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,19 +20,18 @@ jobs: | |
with: | ||
node-version: "12" | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/[email protected] | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
- name: Cache node_modules | ||
uses: actions/[email protected] | ||
id: cached-node_modules | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
path: | | ||
node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install all yarn packages | ||
run: yarn --frozen-lockfile | ||
if: steps.cached-node_modules.outputs.cache-hit != 'true' | ||
run: | | ||
yarn --frozen-lockfile | ||
- name: Check redirects file(s) | ||
run: yarn content validate-redirects en-us --strict |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,19 +19,18 @@ jobs: | |
with: | ||
node-version: "12" | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/[email protected] | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
- name: Cache node_modules | ||
uses: actions/[email protected] | ||
id: cached-node_modules | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
path: | | ||
node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install all yarn packages | ||
run: yarn --frozen-lockfile | ||
if: steps.cached-node_modules.outputs.cache-hit != 'true' | ||
run: | | ||
yarn --frozen-lockfile | ||
- name: Start the Yari server | ||
run: | | ||
|