Skip to content

Commit

Permalink
chore: move copy to external generic-content repo
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Oct 31, 2024
1 parent 17939b0 commit d86f9d9
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 1,027 deletions.
1 change: 1 addition & 0 deletions .env-dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CONTENT_ROOT=../content/files
#CONTENT_TRANSLATED_ROOT=../translated-content/files
#CONTRIBUTOR_SPOTLIGHT_ROOT=../mdn-contributor-spotlight/contributors
#GENERIC_CONTENT_ROOT=../generic-content/files

REACT_APP_DEV_MODE=true

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ jobs:
lfs: true
token: ${{ secrets.MDN_STUDIO_PAT }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
with:
repository: mdn/generic-content
path: mdn/generic-content
token: ${{ secrets.GENERIC_CONTENT_PAT }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
with:
Expand Down Expand Up @@ -176,6 +183,7 @@ jobs:
CONTRIBUTOR_SPOTLIGHT_ROOT: ${{ github.workspace }}/mdn/mdn-contributor-spotlight/contributors
BLOG_ROOT: ${{ github.workspace }}/mdn/mdn-studio/content/posts
CURRICULUM_ROOT: ${{ github.workspace }}/mdn/curriculum
GENERIC_CONTENT_ROOT: ${{ github.workspace }}/mdn/generic-content/files
BASE_URL: "https://developer.mozilla.org"

# The default for this environment variable is geared for writers
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ jobs:
lfs: true
token: ${{ secrets.MDN_STUDIO_PAT }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
with:
repository: mdn/generic-content
path: mdn/generic-content
token: ${{ secrets.GENERIC_CONTENT_PAT }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
with:
Expand Down Expand Up @@ -199,6 +206,7 @@ jobs:
CONTRIBUTOR_SPOTLIGHT_ROOT: ${{ github.workspace }}/mdn/mdn-contributor-spotlight/contributors
BLOG_ROOT: ${{ github.workspace }}/mdn/mdn-studio/content/posts
CURRICULUM_ROOT: ${{ github.workspace }}/mdn/curriculum
GENERIC_CONTENT_ROOT: ${{ github.workspace }}/mdn/generic-content/files
BASE_URL: "https://developer.allizom.org"

# The default for this environment variable is geared for writers
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ jobs:
lfs: true
token: ${{ secrets.MDN_STUDIO_PAT }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
with:
repository: mdn/generic-content
path: mdn/generic-content
token: ${{ secrets.GENERIC_CONTENT_PAT }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
with:
Expand Down Expand Up @@ -109,6 +116,7 @@ jobs:
CONTRIBUTOR_SPOTLIGHT_ROOT: ${{ github.workspace }}/mdn/mdn-contributor-spotlight/contributors
BLOG_ROOT: ${{ github.workspace }}/mdn/mdn-studio/content/posts
CURRICULUM_ROOT: ${{ github.workspace }}/mdn/curriculum
GENERIC_CONTENT_ROOT: ${{ github.workspace }}/mdn/generic-content/files
BASE_URL: "https://test.developer.allizom.org"

# The default for this environment variable is geared for writers
Expand Down
33 changes: 18 additions & 15 deletions build/spas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
CONTRIBUTOR_SPOTLIGHT_ROOT,
BUILD_OUT_ROOT,
DEV_MODE,
GENERIC_CONTENT_ROOT,
} from "../libs/env/index.js";
import { isValidLocale } from "../libs/locale-utils/index.js";
import { DocFrontmatter, DocParent, NewsItem } from "../libs/types/document.js";
Expand Down Expand Up @@ -343,21 +344,23 @@ export async function buildSPAs(options: {
}
}

await buildStaticPages(
fileURLToPath(new URL("../copy/plus/", import.meta.url)),
"plus/docs",
"MDN Plus"
);
await buildStaticPages(
fileURLToPath(new URL("../copy/observatory/", import.meta.url)),
"observatory/docs",
OBSERVATORY_TITLE
);
await buildStaticPages(
fileURLToPath(new URL("../copy/community/", import.meta.url)),
"",
"Contribute to MDN"
);
if (GENERIC_CONTENT_ROOT) {
await buildStaticPages(
path.join(GENERIC_CONTENT_ROOT, "plus"),
"plus/docs",
"MDN Plus"
);
await buildStaticPages(
path.join(GENERIC_CONTENT_ROOT, "observatory"),
"observatory/docs",
OBSERVATORY_TITLE
);
await buildStaticPages(
path.join(GENERIC_CONTENT_ROOT, "community"),
"",
"Contribute to MDN"
);
}

// Build all the home pages in all locales.
// Fetch merged content PRs for the latest contribution section.
Expand Down
156 changes: 0 additions & 156 deletions copy/community/community.md

This file was deleted.

Loading

0 comments on commit d86f9d9

Please sign in to comment.