Skip to content

Commit

Permalink
Re-embed apis
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanrajh committed Apr 3, 2023
1 parent d07c534 commit 2b8be82
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/checkout-test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ jobs:
name: full-build-${{ github.sha }}
path: full-build.zip

#- name: Upload external
# uses: actions/upload-artifact@v3
# with:
# if-no-files-found: error
# name: db-external-${{ github.sha }}
# path: external/db-external.zip
- name: Upload external
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: db-external-${{ github.sha }}
path: external/db-external.zip

chromatic:
name: Deploy Storybook to Chromatic
Expand Down Expand Up @@ -263,15 +263,15 @@ jobs:
with:
name: db-index-${{ github.sha }}

#- uses: actions/download-artifact@v3
# with:
# name: db-external-${{ github.sha }}
- uses: actions/download-artifact@v3
with:
name: db-external-${{ github.sha }}

- name: Merge base and external sources
run: |
mkdir merged
unzip -o db-index.zip -d merged
true || unzip -o db-external.zip -d merged
unzip -o db-external.zip -d merged
zip -r db-merged.zip merged/
- name: Send artifact
Expand Down
14 changes: 7 additions & 7 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default defineConfigWithTheme<ThemeConfig>({
/**
* Fetch Stoplight URLs.
*/
/*const stoplightUrls = [
const stoplightUrls = [
...await getStoplightUrls({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0NQ/table-of-contents',
prefix: '/resources/api/store-api-reference.html#/',
Expand All @@ -146,31 +146,31 @@ export default defineConfigWithTheme<ThemeConfig>({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0Mw/table-of-contents',
prefix: '/resources/api/admin-api-reference.html#/',
}),
];*/
];

/**
* Create public sitemap.xml.
*/
await createSitemap(/*stoplightUrls*/);
await createSitemap(stoplightUrls);

/**
* Transform Store API JSON reference to Markdown for Knowledge base.
*/
/*await generateMarkdownFromStoplight({
await generateMarkdownFromStoplight({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0NQ/table-of-contents',
nodes: 'https://shopware.stoplight.io/api/v1/workspaces/d2s6MzM5MTQ/nodes?project_ids[0]=cHJqOjEwNjA0NQ',
reference: 'https://raw.githubusercontent.com/shopware/store-api-reference/main/storeapi.json',
as: 'resources/api/admin-api-reference.html',
});*/
});

/**
* Transform Admin API JSON reference to Markdown for Knowledge base.
*/
/*await generateMarkdownFromStoplight({
await generateMarkdownFromStoplight({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0Mw/table-of-contents',
nodes: 'https://shopware.stoplight.io/api/v1/workspaces/d2s6MzM5MTQ/nodes?project_ids[0]=cHJqOjEwNjA0Mw',
reference: 'https://raw.githubusercontent.com/shopware/admin-api-reference/main/storeapi.json',
as: 'resources/api/store-api-reference.html',
}, false);*/
}, false);
}
});
6 changes: 2 additions & 4 deletions .vitepress/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ const navigation = buildSidebarNav('./src/', [
items: [
{
text: "Store API",
// link: "/resources/api/store-api-reference",
link: 'https://shopware.stoplight.io/docs/store-api/',
link: "/resources/api/store-api-reference",
repo: 'shopware/store-api-reference',
},
{
text: "Admin API",
//link: "/resources/api/admin-api-reference",
link: 'https://shopware.stoplight.io/docs/admin-api/',
link: "/resources/api/admin-api-reference",
repo: 'shopware/admin-api-reference',
}
]
Expand Down

0 comments on commit 2b8be82

Please sign in to comment.