chore: move docs-util to www (#7232)
* reorganize docs apps * add README * fix directory * add condition for old docs * move docs-util to www * remove remaining docs-util * fixes of paths * fix scripts * path fixes * fix github actions * add build packages script
This commit is contained in:
59
.github/workflows/docs-test.yml
vendored
59
.github/workflows/docs-test.yml
vendored
@@ -37,6 +37,13 @@ jobs:
|
||||
- name: Build Doc Apps
|
||||
working-directory: www
|
||||
run: yarn build
|
||||
env:
|
||||
NEXT_PUBLIC_BASE_URL: "http://localhost:3000"
|
||||
NEXT_PUBLIC_DOCS_URL: "https://medusa-docs.vercel.app"
|
||||
NEXT_PUBLIC_UI_URL: "https://docs-ui.vercel.app"
|
||||
# TODO change once we have actual URLs
|
||||
NEXT_PUBLIC_RESOURCES_URL: "http://example.com"
|
||||
NEXT_PUBLIC_USER_GUIDE_URL: "http://example.com"
|
||||
|
||||
vale-book:
|
||||
if: ${{ startsWith(github.head_ref, 'docs/') }}
|
||||
@@ -52,13 +59,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install docs-util Dependencies
|
||||
- name: Install www/utils Dependencies
|
||||
run: yarn
|
||||
working-directory: docs-util
|
||||
working-directory: www/utils
|
||||
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
working-directory: docs-util
|
||||
working-directory: www/utils
|
||||
|
||||
# reviewdog throws an error when the number
|
||||
# of file changes in a PR is > 300, so
|
||||
@@ -67,7 +74,7 @@ jobs:
|
||||
# less than 300. This is to avoid a PR hanging in
|
||||
# an error state
|
||||
- name: Get PR files number
|
||||
working-directory: docs-util/packages/scripts
|
||||
working-directory: www/utils/packages/scripts
|
||||
run: 'yarn check:pr-files-count ${{ github.ref_name }}'
|
||||
id: pr-files
|
||||
|
||||
@@ -78,6 +85,7 @@ jobs:
|
||||
id: directories
|
||||
|
||||
- name: Vale Linter
|
||||
if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }}
|
||||
uses: errata-ai/vale-action@reviewdog
|
||||
with:
|
||||
files: ${{ steps.directories.outputs.LIST }}
|
||||
@@ -103,6 +111,14 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install www/utils Dependencies
|
||||
run: yarn
|
||||
working-directory: www/utils
|
||||
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
working-directory: www/utils
|
||||
|
||||
# reviewdog throws an error when the number
|
||||
# of file changes in a PR is > 300, so
|
||||
# we retrieve the number of changed files
|
||||
@@ -110,7 +126,7 @@ jobs:
|
||||
# less than 300. This is to avoid a PR hanging in
|
||||
# an error state
|
||||
- name: Get PR files number
|
||||
working-directory: docs-util/packages/scripts
|
||||
working-directory: www/utils/packages/scripts
|
||||
run: 'yarn check:pr-files-count ${{ github.ref_name }}'
|
||||
id: pr-files
|
||||
|
||||
@@ -121,6 +137,7 @@ jobs:
|
||||
|
||||
- name: Vale Linter
|
||||
uses: errata-ai/vale-action@reviewdog
|
||||
if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }}
|
||||
with:
|
||||
files: ${{ steps.directories.outputs.LIST }}
|
||||
fail_on_error: true
|
||||
@@ -145,6 +162,14 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install www/utils Dependencies
|
||||
run: yarn
|
||||
working-directory: www/utils
|
||||
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
working-directory: www/utils
|
||||
|
||||
# reviewdog throws an error when the number
|
||||
# of file changes in a PR is > 300, so
|
||||
# we retrieve the number of changed files
|
||||
@@ -152,7 +177,7 @@ jobs:
|
||||
# less than 300. This is to avoid a PR hanging in
|
||||
# an error state
|
||||
- name: Get PR files number
|
||||
working-directory: docs-util/packages/scripts
|
||||
working-directory: www/utils/packages/scripts
|
||||
run: 'yarn check:pr-files-count ${{ github.ref_name }}'
|
||||
id: pr-files
|
||||
|
||||
@@ -162,8 +187,8 @@ jobs:
|
||||
id: directories
|
||||
|
||||
- name: Vale Linter
|
||||
if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }}
|
||||
uses: errata-ai/vale-action@reviewdog
|
||||
if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }}
|
||||
with:
|
||||
files: ${{ steps.directories.outputs.LIST }}
|
||||
fail_on_error: true
|
||||
@@ -188,13 +213,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install docs-util Dependencies
|
||||
- name: Install www/utils Dependencies
|
||||
run: yarn
|
||||
working-directory: docs-util
|
||||
working-directory: www/utils
|
||||
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
working-directory: docs-util
|
||||
working-directory: www/utils
|
||||
|
||||
# reviewdog throws an error when the number
|
||||
# of file changes in a PR is > 300, so
|
||||
@@ -203,7 +228,7 @@ jobs:
|
||||
# less than 300. This is to avoid a PR hanging in
|
||||
# an error state
|
||||
- name: Get PR files number
|
||||
working-directory: docs-util/packages/scripts
|
||||
working-directory: www/utils/packages/scripts
|
||||
run: 'yarn check:pr-files-count ${{ github.ref_name }}'
|
||||
id: pr-files
|
||||
|
||||
@@ -240,13 +265,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install docs-util Dependencies
|
||||
- name: Install www/utils Dependencies
|
||||
run: yarn
|
||||
working-directory: docs-util
|
||||
working-directory: www/utils
|
||||
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
working-directory: docs-util
|
||||
working-directory: www/utils
|
||||
|
||||
# reviewdog throws an error when the number
|
||||
# of file changes in a PR is > 300, so
|
||||
@@ -255,7 +280,7 @@ jobs:
|
||||
# less than 300. This is to avoid a PR hanging in
|
||||
# an error state
|
||||
- name: Get PR files number
|
||||
working-directory: docs-util/packages/scripts
|
||||
working-directory: www/utils/packages/scripts
|
||||
run: 'yarn check:pr-files-count ${{ github.ref_name }}'
|
||||
id: pr-files
|
||||
|
||||
@@ -321,6 +346,10 @@ jobs:
|
||||
working-directory: www
|
||||
run: yarn install
|
||||
|
||||
- name: Build packages
|
||||
working-directory: www
|
||||
run: yarn build:packages
|
||||
|
||||
- name: Run Eslint
|
||||
working-directory: www
|
||||
run: yarn lint
|
||||
Reference in New Issue
Block a user