aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/pr-check_redirects.yml15
-rw-r--r--.github/workflows/pr-lint.yml11
-rw-r--r--.github/workflows/pr-test.yml22
3 files changed, 16 insertions, 32 deletions
diff --git a/.github/workflows/pr-check_redirects.yml b/.github/workflows/pr-check_redirects.yml
index 2967d0574f..5405d26528 100644
--- a/.github/workflows/pr-check_redirects.yml
+++ b/.github/workflows/pr-check_redirects.yml
@@ -19,11 +19,6 @@ jobs:
with:
repository: mdn/content
path: mdn/content
- # Yes, this means fetch EVERY COMMIT EVER.
- # It's probably not sustainable in the far future (e.g. past 2021)
- # but for now it's good enough. We'll need all the history
- # so we can figure out each document's last-modified date.
- fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
@@ -42,14 +37,14 @@ jobs:
${{ runner.os }}-yarn-
- name: Install all yarn packages
+ working-directory: ${{ github.workspace }}/mdn/content
run: |
- cd $GITHUB_WORKSPACE/mdn/content/
yarn --frozen-lockfile
- name: Check redirects file(s)
+ env:
+ content_root: ${{ github.workspace }}/mdn/content/files
+ content_translated_root: ${{ github.workspace }}/files
+ working-directory: ${{ github.workspace }}/mdn/content
run: |
- export CONTENT_ROOT=$GITHUB_WORKSPACE/mdn/content/files
- export CONTENT_TRANSLATED_ROOT=$GITHUB_WORKSPACE/files
-
- cd $GITHUB_WORKSPACE/mdn/content/
yarn content validate-redirects --strict
diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml
index 5330e98619..6b32fe1168 100644
--- a/.github/workflows/pr-lint.yml
+++ b/.github/workflows/pr-lint.yml
@@ -20,11 +20,6 @@ jobs:
with:
repository: mdn/content
path: mdn/content
- # Yes, this means fetch EVERY COMMIT EVER.
- # It's probably not sustainable in the far future (e.g. past 2021)
- # but for now it's good enough. We'll need all the history
- # so we can figure out each document's last-modified date.
- fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
@@ -32,13 +27,11 @@ jobs:
node-version: "12"
- name: Install all yarn packages
+ working-directory: ${{ github.workspace }}/mdn/content/pr-lint
run: |
- cd $GITHUB_WORKSPACE/mdn/content/
- cd pr-lint
yarn --frozen-lockfile
- name: Run checks
+ working-directory: ${{ github.workspace }}/mdn/content/pr-lint
run: |
- cd $GITHUB_WORKSPACE/mdn/content/
- cd pr-lint
yarn run check
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
index 0f17a767c8..52c38a8de0 100644
--- a/.github/workflows/pr-test.yml
+++ b/.github/workflows/pr-test.yml
@@ -27,11 +27,6 @@ jobs:
with:
repository: mdn/content
path: mdn/content
- # Yes, this means fetch EVERY COMMIT EVER.
- # It's probably not sustainable in the far future (e.g. past 2021)
- # but for now it's good enough. We'll need all the history
- # so we can figure out each document's last-modified date.
- fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
@@ -48,8 +43,8 @@ jobs:
- name: Install all yarn packages
if: steps.cached-node_modules.outputs.cache-hit != 'true'
+ working-directory: ${{ github.workspace }}/mdn/content
run: |
- cd $GITHUB_WORKSPACE/mdn/content/
yarn --frozen-lockfile
- uses: technote-space/get-diff-action@v4.0.5
@@ -60,10 +55,12 @@ jobs:
- name: Build changed content
if: ${{ env.GIT_DIFF_CONTENT }}
+ env:
+ content_root: ${{ github.workspace }}/mdn/content/files
+ content_translated_root: ${{ github.workspace }}/files
+ working-directory: ${{ github.workspace }}/mdn/content
run: |
echo ${{ env.GIT_DIFF_CONTENT }}
- export CONTENT_ROOT=$GITHUB_WORKSPACE/mdn/content/files
- export CONTENT_TRANSLATED_ROOT=$GITHUB_WORKSPACE/files
# Some day, when our number of flaws have reached 0 we'll change
# this to "*:error" which means the slightest flaw in the build
@@ -108,7 +105,6 @@ jobs:
# and it can't use the default CONTENT_ROOT that gets set in
# package.json.
- cd $GITHUB_WORKSPACE/mdn/content/
yarn build ${{ env.GIT_DIFF_CONTENT }}
- uses: technote-space/get-diff-action@v4.0.5
@@ -119,11 +115,11 @@ jobs:
- name: Check changed files
if: ${{ env.GIT_DIFF_FILES }}
+ env:
+ content_root: ${{ github.workspace }}/mdn/content/files
+ content_translated_root: ${{ github.workspace }}/files
+ working-directory: ${{ github.workspace }}/mdn/content
run: |
echo ${{ env.GIT_DIFF_FILES }}
- export CONTENT_ROOT=$GITHUB_WORKSPACE/mdn/content/files
- export TRANSLATED_CONTENT_ROOT=$GITHUB_WORKSPACE/files
-
- cd $GITHUB_WORKSPACE/mdn/content/
yarn filecheck ${{ env.GIT_DIFF_FILES }}