Skip to content

Commit

Permalink
ci: refactoring deploy pr as draft [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc committed Dec 4, 2024
1 parent d05bd03 commit d01dc87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
19 changes: 0 additions & 19 deletions .github/actions/draft-components/action.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/documentation-deploy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
env:
PR_NAME: pr-${{ github.event.number }}
PREFIX: pr/pr-${{ github.event.number }}
HAS_DRAFT_COMPONENTS: false
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -169,15 +170,12 @@ jobs:
npm run storybook:build --prefix="./packages/${{ matrix.package }}"
cp -R ./packages/${{ matrix.package }}/build-sb ./s3_build/${PR_NAME}/${{ env.SHORT_NAME }}-storybook
- name: TEST draft-components
uses: ./.github/actions/draft-components

- name: Build draft components storybook - "${{ matrix.package }}"
if: false
run: |
if grep -q '"storybook:draft"' package.json; then
if grep -q '"storybook:draft"' "./packages/${{ matrix.package }}/package.json"; then
npm run storybook:build:draft --prefix="./packages/${{ matrix.package }}"
cp -R ./packages/${{ matrix.package }}/build-sb-draft ./s3_build/${PR_NAME}/${{ env.SHORT_NAME }}-draft-storybook
echo "HAS_DRAFT_COMPONENTS=true" >> $GITHUB_ENV
else
echo "Package not have draft components"
fi
Expand All @@ -202,7 +200,7 @@ jobs:
s3://${{ secrets.AWS_S3_BUCKET_2 }}/pr/${PR_NAME}/${{ env.SHORT_NAME }}/
- name: s3 upload storybook for draft components
if: false
if: ${{ env.HAS_DRAFT_COMPONENTS }}
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down

0 comments on commit d01dc87

Please sign in to comment.