-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert "fix caching" * trivial change * correct the path * trivial change * trivial change * other files too
- Loading branch information
Showing
3 changed files
with
27 additions
and
41 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 |
---|---|---|
|
@@ -26,19 +26,16 @@ 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: | | ||
${{ github.workspace }}/mdn/content/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install all yarn packages | ||
if: steps.cached-node_modules.outputs.cache-hit != 'true' | ||
working-directory: ${{ github.workspace }}/mdn/content | ||
run: | | ||
yarn --frozen-lockfile | ||
|
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 |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# Note that this workflow uses `get-diff-action` which is important. | ||
# It gives us an environment variable called `GIT_DIFF` which is a string | ||
# that is a list of file paths. | ||
# If you want to do what this workflow does on your laptop you can simulate | ||
# it like this: | ||
# | ||
# export GIT_DIFF=`git diff --name-only main... | grep 'files/' | grep '\.html$'` | ||
# node content build --no-progressbar --files="${GIT_DIFF}" | ||
# | ||
# That way, you can behave on your laptop like, this action behaves here. | ||
# This is more or less a copy of | ||
# https://github.com/mdn/content/blob/main/.github/workflows/pr-test.yml | ||
# but done in a way that it first checks out mdn/translated-content (or | ||
# fork of) and _then_ checks out mdn/content which has the relevant | ||
# CI related tooling. | ||
|
||
name: PR Test | ||
|
||
|
@@ -33,19 +28,16 @@ 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: | | ||
${{ github.workspace }}/mdn/content/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install all yarn packages | ||
if: steps.cached-node_modules.outputs.cache-hit != 'true' | ||
working-directory: ${{ github.workspace }}/mdn/content | ||
run: | | ||
yarn --frozen-lockfile | ||
|
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 |
---|---|---|
|
@@ -28,19 +28,16 @@ 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: | | ||
${{ github.workspace }}/mdn/content/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install all yarn packages | ||
if: steps.cached-node_modules.outputs.cache-hit != 'true' | ||
working-directory: ${{ github.workspace }}/mdn/content | ||
run: | | ||
yarn --frozen-lockfile | ||
|
@@ -53,7 +50,7 @@ jobs: | |
run: | | ||
yarn content sync-translated-content | ||
- name: Commit changes | ||
- name: Commit changes | ||
# git commit will fail if there are no changes but that's okay! | ||
continue-on-error: true | ||
run: | | ||
|