PLASMA-4081: Autocomplete RequiredProps types [DONT MERGE] #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Отдельный workflow для pull request из ветки release_**-**-** в master. | |
# Собирает storybook для всех пакетов (plasma-{web,b2c,ui,asdk,etc}) без каких либо условий. | |
# Мотивация - нужен стенд для проведения регрессионного тестирования релизных изменений. | |
name: Deploy documentations artefacts [RELEASE BRANCH] | |
on: | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
# New commit on branch cancels running workflows of the same branch | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
documentation: | |
name: Deploy documentation | |
if: ${{ startsWith(github.head_ref, 'release') }} | |
runs-on: ubuntu-22.04 | |
env: | |
PR_NAME: pr-${{ github.event.number }} | |
ICONS_PUBLIC_URL: /icons | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Prepare environment | |
uses: ./.github/actions/prepare-environment | |
- name: Lerna bootstrap | |
run: npx lerna bootstrap | |
- name: Prepare directory | |
run: mkdir -p s3_build/${PR_NAME} | |
# TODO: https://github.com/salute-developers/plasma/issues/603 | |
- name: Plasma Website | |
run: | | |
export NODE_OPTIONS=--openssl-legacy-provider | |
npm run build --prefix="./website/plasma-website" | |
cp -R ./website/plasma-website/build/. ./s3_build/${PR_NAME} | |
- name: Plasma UI Docs | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=8192 --openssl-legacy-provider" | |
npm run build --prefix="./website/plasma-ui-docs" | |
cp -R ./website/plasma-ui-docs/build ./s3_build/${PR_NAME}/ui | |
- name: Plasma Web Docs | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=8192 --openssl-legacy-provider" | |
npm run build --prefix="./website/plasma-web-docs" | |
cp -R ./website/plasma-web-docs/build ./s3_build/${PR_NAME}/web | |
- name: Plasma B2C Docs | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=8192 --openssl-legacy-provider" | |
npm run build --prefix="./website/plasma-b2c-docs" | |
cp -R ./website/plasma-b2c-docs/build ./s3_build/${PR_NAME}/b2c | |
- name: Plasma UI Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/plasma-ui" | |
cp -R ./packages/plasma-ui/build-sb ./s3_build/${PR_NAME}/ui-storybook | |
- name: Plasma Web Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/plasma-web" | |
cp -R ./packages/plasma-web/build-sb ./s3_build/${PR_NAME}/web-storybook | |
- name: Plasma B2C Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/plasma-b2c" | |
cp -R ./packages/plasma-b2c/build-sb ./s3_build/${PR_NAME}/b2c-storybook | |
- name: Plasma "New Hope" Storybook | |
run: | | |
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 | |
run: | | |
npm run storybook:build --prefix="./packages/plasma-asdk" | |
cp -R ./packages/plasma-asdk/build-sb ./s3_build/${PR_NAME}/asdk-storybook | |
- name: Plasma "SDDS SERV" Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/sdds-serv" | |
cp -R ./packages/sdds-serv/build-sb ./s3_build/${PR_NAME}/sdds-serv-storybook | |
- name: Plasma "SDDS CS" Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/sdds-cs" | |
cp -R ./packages/sdds-cs/build-sb ./s3_build/${PR_NAME}/sdds-cs-storybook | |
- name: Plasma "SDDS DFA" Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/sdds-dfa" | |
cp -R ./packages/sdds-dfa/build-sb ./s3_build/${PR_NAME}/sdds-dfa-storybook | |
- name: Plasma "SDDS FinPortal" Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/sdds-finportal" | |
cp -R ./packages/sdds-finportal/build-sb ./s3_build/${PR_NAME}/sdds-finportal-storybook | |
- name: Plasma "SDDS INSOL" Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/sdds-insol" | |
cp -R ./packages/sdds-insol/build-sb ./s3_build/${PR_NAME}/sdds-insol-storybook | |
- name: Install s3cmd | |
run: pip3 install s3cmd | |
- name: s3 Upload builds | |
run: > | |
s3cmd | |
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }} | |
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
--host ${{ secrets.AWS_ENDPOINT }} | |
--host-bucket ${{ secrets.AWS_ENDPOINT }} | |
--bucket-location ${{ secrets.AWS_REGION }} | |
--signature-v2 | |
--delete-removed | |
--no-mime-magic | |
sync | |
./s3_build/${PR_NAME}/ | |
s3://${{ secrets.AWS_S3_BUCKET_2 }}/pr/${PR_NAME}/ | |
- name: Post success comment | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{secrets.GH_TOKEN}} | |
script: | | |
const { | |
issue: { number }, | |
repo: { owner, repo } | |
} = context; | |
github.rest.issues.createComment({ | |
issue_number: number, | |
owner, | |
repo, | |
body: `Documentation preview deployed! | |
website: http://plasma.sberdevices.ru/pr/pr-${number}/ | |
b2c storybook: http://plasma.sberdevices.ru/pr/pr-${number}/b2c-storybook/ | |
web storybook: http://plasma.sberdevices.ru/pr/pr-${number}/web-storybook/ | |
ui storybook: http://plasma.sberdevices.ru/pr/pr-${number}/ui-storybook/ | |
new-hope storybook: http://plasma.sberdevices.ru/pr/pr-${number}/new-hope-storybook/ | |
asdk storybook: http://plasma.sberdevices.ru/pr/pr-${number}/asdk-storybook/ | |
sdds-serv storybook: http://plasma.sberdevices.ru/pr/pr-${number}/sdds-serv-storybook/ | |
sdds-cs storybook: http://plasma.sberdevices.ru/pr/pr-${number}/sdds-cs-storybook/ | |
sdds-dfa storybook: http://plasma.sberdevices.ru/pr/pr-${number}/sdds-dfa-storybook/ | |
sdds-finportal storybook: http://plasma.sberdevices.ru/pr/pr-${number}/sdds-finportal-storybook/ | |
sdds-insol storybook: http://plasma.sberdevices.ru/pr/pr-${number}/sdds-insol-storybook/ | |
` | |
}); |