Cleanup
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user