Skip to content

Commit

Permalink
Re-embed apis
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanrajh committed May 4, 2023
1 parent dd6e6ff commit 06daec8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/checkout-test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ jobs:
export NODE_OPTIONS="--max-old-space-size=8096"
pnpm run build
#- name: Zip externals
# run: |
# cd external && zip -r db-external.zip * -i '*.md'
- name: Zip externals
run: |
cd external && zip -r db-external.zip * -i '*.md'
- name: Zip folder
run: zip -r full-build.zip .vitepress/dist/
Expand All @@ -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 @@ -272,7 +272,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 @@ -281,31 +281,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 @@ -31,14 +31,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 06daec8

Please sign in to comment.