Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(v1.x): use correct branch name #7233

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/docs-new-announcement.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Docs Release Announcement Bar
name: Generate Docs Release Announcement Bar (v1)
on:
release:
types: [published]
Expand All @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down Expand Up @@ -50,7 +51,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated Docs Announcement Bar (automated)"
base: "develop"
base: "v1.x"
title: "chore(docs): Generated Docs Announcement Bar (automated)"
labels: "type: chore"
add-paths: www/apps/docs/**
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs-remove-announcement.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Checks if the announcement bar info was last edited more than 6 days ago, and if so removes it
name: Remove Docs Release Announcement Bar
name: Remove Docs Release Announcement Bar (v1)
on:
schedule:
- cron: "0 0 * * *"
Expand All @@ -19,6 +19,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Removed Docs Announcement Bar (automated)"
base: "develop"
base: "v1.x"
title: "chore(docs): Removed Docs Announcement Bar (automated)"
labels: "type: chore"
add-paths: www/apps/docs/**
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Documentation Tests
name: Documentation Tests (v1)
on:
pull_request:
paths:
- www/**
branches:
- 'v1.x'

jobs:
docs-test:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/generate-docblocks-reference.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Generate References for Docblocks [Automated]
name: Generate References for Docblocks (v1) [Automated]

on:
pull_request:
branches:
- develop
- v1.x
types:
- closed
workflow_dispatch:
Expand All @@ -27,6 +27,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down Expand Up @@ -77,7 +78,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated References (automated)"
base: "develop"
base: "v1.x"
title: "chore(docs): Generated References"
labels: "type: chore"
add-paths: www/apps/docs/content/references/**
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/generate-docblocks.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Generate Docblocks [Automated]
name: Generate Docblocks (v1) [Automated]

on:
push:
branches:
- develop
- v1.x
workflow_dispatch:

jobs:
Expand All @@ -13,6 +13,9 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js 18
uses: actions/setup-node@v3
Expand Down Expand Up @@ -69,6 +72,9 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js 18
uses: actions/setup-node@v3
Expand Down Expand Up @@ -110,6 +116,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
base: "v1.x"
title: "chore(docs): Generated OAS"
body: "This PR holds all generated OAS for the upcoming release."
branch: "chore/generate-oas"
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/generate-references.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Automated Documentation
name: Generate Automated Documentation (v1)
on:
workflow_dispatch:
inputs:
Expand All @@ -24,6 +24,7 @@ jobs:
with:
token: ${{ secrets.REFERENCE_PAT }}
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated API Reference"
base: "develop"
base: "v1.x"
title: "chore(docs): Updated API Reference"
labels: "type: chore"
add-paths: www/apps/api-reference/specs
Expand All @@ -74,6 +75,7 @@ jobs:
with:
token: ${{ secrets.REFERENCE_PAT }}
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down Expand Up @@ -104,7 +106,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated API Reference (v2)"
base: "develop"
base: "v1.x"
title: "chore(docs): Updated API Reference (v2)"
labels: "type: chore"
add-paths: www/apps/api-reference/specs
Expand All @@ -124,6 +126,7 @@ jobs:
with:
token: ${{ secrets.REFERENCE_PAT }}
fetch-depth: 0
ref: "v1.x"

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down Expand Up @@ -159,7 +162,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated UI Reference"
base: "develop"
base: "v1.x"
title: "chore(docs): Updated UI Reference"
labels: "type: chore"
add-paths: www/apps/ui/src/specs
Expand Down
2 changes: 2 additions & 0 deletions docs-util/packages/scripts/doc-change-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ async function main() {
repo: "medusa",
path: path.join("www", "apps", "docs", "announcement.json"),
per_page: 1,
sha: "v1.x"
}
)

Expand All @@ -47,6 +48,7 @@ async function main() {
{
owner: "medusajs",
repo: "medusa",
sha: "v1.x"
}
)

Expand Down
1 change: 1 addition & 0 deletions docs-util/packages/scripts/freshness-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ async function scanDirectory(startPath: string) {
repo: "medusa",
path: filePath,
per_page: 1,
sha: "v1.x"
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This type of contribution is a no-code contribution, meaning you don't need adva
git clone https://github.com/medusajs/medusa.git
```

If you already have it cloned, make sure to pull the latest changes from the `develop` branch.
If you already have it cloned, make sure to pull the latest changes from the `v1.x` branch.

2\. Create a branch that will be used to open the pull request later:

Expand Down
16 changes: 11 additions & 5 deletions www/apps/docs/content/contribution/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ This guide is specific to contributing to the documentation. If you’re interes

## Documentation Workspace

Medusa's documentation projects are all part of the documentation yarn workspace, which you can find in the [medusa repository](https://github.com/medusajs/medusa) under the `www` directory.
Medusa's documentation projects are all part of the documentation yarn workspace, which you can find in the [medusa repository](https://github.com/medusajs/medusa/tree/v1.x) under the `www` directory.

The workspace has the following two directories:

:::note

This describes the structure under the [v1.x branch](https://github.com/medusajs/medusa/tree/v1.x) of the Medusa repository.

:::

- `apps`: this directory holds the different documentation websites and projects.
- `docs`: includes the codebase for the main documentation website (the one you're viewing this documentation on). It's built with [Docusaurus](https://docusaurus.io/).
- `api-reference`: includes the codebase for the API reference website. It's built with [Next.js 13](https://nextjs.org/).
Expand All @@ -35,21 +41,21 @@ The workspace has the following two directories:

### Main Documentation Website

The documentation content is written in Markdown format and is located in the [www/apps/docs/content](https://github.com/medusajs/medusa/tree/develop/www/apps/docs/content) directory of the Medusa repository. If you’re not familiar with Markdown, check out [this cheat sheet](https://www.markdownguide.org/cheat-sheet/) for a quick start.
The documentation content is written in Markdown format and is located in the [www/apps/docs/content](https://github.com/medusajs/medusa/tree/v1.x/www/apps/docs/content) directory of the `v1.x` branch of the Medusa repository. If you’re not familiar with Markdown, check out [this cheat sheet](https://www.markdownguide.org/cheat-sheet/) for a quick start.

You’ll also find MDX files. MDX files combine the power of Markdown with React. So, the content of the file can contain JSX components and import statements, among other features. You can learn more about [MDX in docusaurus’s guide.](https://docusaurus.io/docs/markdown-features/react).

:::note

Documentation pages under the `www/apps/docs/content/references` directory are generated automatically from the source code under the `packages/medusa` directory. So, you can't directly make changes to them. Instead, you'll have to make changes to the comments in the original source code.
Documentation pages under the `www/apps/docs/content/references` directory are generated automatically from the source code under the `packages` directory. So, you can't directly make changes to them. Instead, you'll have to make changes to the comments in the original source code.

:::

### API Reference

The API reference's content is split into two types:

1. Static content, which are the content related to getting started, expanding fields, and more. These are located in the [www/apps/api-reference/app/_mdx](https://github.com/medusajs/medusa/tree/develop/www/apps/api-reference/app/_mdx) directory. They are MDX files.
1. Static content, which are the content related to getting started, expanding fields, and more. These are located in the [www/apps/api-reference/app/_mdx](https://github.com/medusajs/medusa/tree/v1.x/www/apps/api-reference/app/_mdx) directory. They are MDX files.
2. OpenAPI specs that are shown to developers when checking the reference of an API Route. These are automatically generated from comments on API Routes. So, if you find issues in them or want to make improvements, you have to find the API Routes under the [`packages/medusa/src/api`](https://github.com/medusajs/medusa/tree/develop/packages/medusa/src/api) directory and make changes to its comments.

### Medusa UI Documentation
Expand All @@ -76,7 +82,7 @@ If you’re adding a new page or contributing to the codebase, you need to fork

When you make an edit to an existing documentation page or fork the repository to make changes to the documentation, you have to create a new branch.

Documentation contributions always use `develop` as the base branch. Make sure to also open your PR against the `develop` branch.
Documentation contributions to this documentation website always use `v1.x` as the base branch. Make sure to also open your PR against the `v1.x` branch.

### Branch Name

Expand Down
3 changes: 1 addition & 2 deletions www/apps/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ const config = {
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://github.com/medusajs/medusa/edit/develop/www/apps/docs",
editUrl: "https://github.com/medusajs/medusa/edit/v1.x/www/apps/docs",
path: "content",
routeBasePath: "/",
remarkPlugins: [
Expand Down
Loading