Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2025-01-09 15:21:21 +00:00
parent 47c85b2b19
commit d751ee6d32
4 changed files with 32 additions and 18 deletions
+14 -13
View File
@@ -1,4 +1,4 @@
name: Sync Canon Storybook
name: Sync Canon Docs
on:
push:
branches: [master]
@@ -26,31 +26,32 @@ jobs:
with:
cache-prefix: ${{ runner.os }}-v20.x
- name: Checkout backstage/canon-storybook
- name: Checkout backstage/canon-docs
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: backstage/canon-storybook
path: canon-storybook
repository: backstage/canon-docs
path: canon-docs
token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
- name: Configure Git
run: |
git config --global user.email noreply@backstage.io
git config --global user.name 'Github Canon Storybook workflow'
git config --global user.name 'Github Canon Docs workflow'
- name: Build Canon Storybook
- name: Build Canon Docs
working-directory: canon-docs
run: |
yarn workspace @backstage/canon run build-storybook
yarn build
- name: Replace contents of canon-storybook repo with Storybook build output
working-directory: canon-storybook
- name: Replace contents of canon-docs repo with docs build output
working-directory: canon-docs
run: |
git rm -rf .
cp -R ../packages/canon/storybook-static/. .
cp -R out/. .
- name: Commit to canon-storybook repo
working-directory: canon-storybook
- name: Commit to canon-docs repo
working-directory: canon-docs
run: |
git add .
git commit -am "Canon Storybook build for backstage/backstage@${{ github.sha }}"
git commit -am "Canon Docs build for backstage/backstage@${{ github.sha }}"
git push
+2
View File
@@ -1,6 +1,8 @@
.yarn
dist
microsite
canon-docs/.next
canon-docs/public
coverage
*.hbs
templates
+15 -4
View File
@@ -2,10 +2,21 @@ import createMDX from '@next/mdx';
const nextConfig = {
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
// output: 'export',
// images: {
// unoptimized: true,
// },
/**
* Enable static exports for the App Router.
*
* @see https://nextjs.org/docs/app/building-your-application/deploying/static-exports
*/
output: 'export',
/**
* Disable server-based image optimization. Next.js does not support
* dynamic features with static exports.
*
* @see https://nextjs.org/docs/app/api-reference/components/image#unoptimized
*/
images: {
unoptimized: true,
},
};
const withMDX = createMDX({});
@@ -31,7 +31,7 @@ export const PropsTable = <T extends Record<string, PropData>>({
</Table.Cell>
<Table.Cell>
{Array.isArray(data[n].type) ? (
data[n].type.map((t) => <Chip key={t}>{t}</Chip>)
data[n].type.map(t => <Chip key={t}>{t}</Chip>)
) : (
<Chip>{data[n].type}</Chip>
)}