Skip to content

Commit

Permalink
ci(plasma-asdk): add storybook build
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanKuzmich committed Nov 9, 2023
1 parent fa7a300 commit 09b2eb0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/processing-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = () => {
const HAS_PLASMA_B2C = packagesList.includes('@salutejs/plasma-b2c');
const HAS_PLASMA_TEMPLE = packagesList.includes('@salutejs/plasma-temple');
const HAS_PLASMA_HOPE = packagesList.includes('@salutejs/plasma-new-hope');
const HAS_PLASMA_ASDK = packagesList.includes('@salutejs/plasma-asdk');

const HAS_DOCUMENTATION_CHANGED = HAS_PLASMA_UI_DOCS || HAS_PLASMA_WEB_DOCS || HAS_PLASMA_TEMPLE_DOCS;

Expand Down Expand Up @@ -74,5 +75,6 @@ module.exports = () => {
HAS_PLASMA_B2C,
HAS_PLASMA_TEMPLE,
HAS_PLASMA_HOPE,
HAS_PLASMA_ASDK,
};
};
5 changes: 5 additions & 0 deletions .github/workflows/change-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ on:
HAS_PLASMA_HOPE:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_HOPE }}
HAS_PLASMA_ASDK:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_ASDK }}
PACKAGES_ENUMERATION:
description: ""
value: ${{ jobs.run.outputs.PACKAGES_ENUMERATION }}
Expand All @@ -63,6 +66,7 @@ jobs:
HAS_PLASMA_WEB: ${{ steps.set-output.outputs.HAS_PLASMA_WEB }}
HAS_PLASMA_UI: ${{ steps.set-output.outputs.HAS_PLASMA_UI }}
HAS_PLASMA_HOPE: ${{ steps.set-output.outputs.HAS_PLASMA_HOPE }}
HAS_PLASMA_ASDK: ${{ steps.set-output.outputs.HAS_PLASMA_ASDK }}
PACKAGES_ENUMERATION: ${{ steps.set-output.outputs.PACKAGES_ENUMERATION }}

steps:
Expand Down Expand Up @@ -110,5 +114,6 @@ jobs:
echo "HAS_PLASMA_WEB=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_WEB }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_UI=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_UI }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_HOPE=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_HOPE }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_ASDK=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_ASDK }}" >> $GITHUB_OUTPUT
echo "PACKAGES_ENUMERATION=${{ fromJSON(steps.scope.outputs.result).PACKAGES_ENUMERATION }}" >> $GITHUB_OUTPUT
13 changes: 12 additions & 1 deletion .github/workflows/documentation-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ jobs:
npm run storybook:build --prefix="./packages/plasma-new-hope"
cp -R ./packages/plasma-new-hope/build-sb ./s3_build/${PR_NAME}/new-hope-storybook
- name: Plasma "ASDK" Storybook
if: ${{ needs.scope.outputs.HAS_PLASMA_ASDK == 'true' }}
run: |
npm run storybook:build --prefix="./packages/plasma-asdk"
cp -R ./packages/plasma-asdk/build-sb ./s3_build/${PR_NAME}/asdk-storybook
- name: Install s3cmd
run: pip3 install s3cmd

Expand All @@ -179,10 +185,11 @@ jobs:
HAS_PLASMA_UI: ${{ fromJSON(needs.scope.outputs.HAS_PLASMA_UI) }}
HAS_PLASMA_TEMPLE: ${{ fromJSON(needs.scope.outputs.HAS_PLASMA_TEMPLE) }}
HAS_PLASMA_HOPE: ${{ fromJSON(needs.scope.outputs.HAS_PLASMA_HOPE) }}
HAS_PLASMA_ASDK: ${{ fromJSON(needs.scope.outputs.HAS_PLASMA_ASDK) }}
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
const { HAS_PLASMA_B2C, HAS_PLASMA_WEB, HAS_PLASMA_UI, HAS_PLASMA_TEMPLE, HAS_PLASMA_HOPE } = process.env;
const { HAS_PLASMA_B2C, HAS_PLASMA_WEB, HAS_PLASMA_UI, HAS_PLASMA_TEMPLE, HAS_PLASMA_HOPE, HAS_PLASMA_ASDK } = process.env;
const {
issue: { number },
Expand Down Expand Up @@ -212,6 +219,10 @@ jobs:
if (HAS_PLASMA_HOPE === 'true') {
links.push(`new-hope storybook: http://plasma.sberdevices.ru/pr/pr-${number}/new-hope-storybook/`)
}
if (HAS_PLASMA_ASDK === 'true') {
links.push(`asdk storybook: http://plasma.sberdevices.ru/pr/pr-${number}/asdk-storybook/`)
}
github.rest.issues.createComment({
issue_number: number,
Expand Down

0 comments on commit 09b2eb0

Please sign in to comment.