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 6772f96 commit d05bd03
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions .github/actions/draft-components/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,13 @@ description: 'Check if change/create draft config components'
runs:
using: "composite"
steps:
- name: Computed HAS_STORYBOOK_DRAFT_SCRIPTS
shell: bash
run: |
if grep -q '"storybook:draft"' package.json; then
echo "HAS_STORYBOOK_DRAFT_SCRIPTS=true" >> $GITHUB_ENV
else
echo "HAS_STORYBOOK_DRAFT_SCRIPTS=false" >> $GITHUB_ENV
fi
- name: Computed HAS_DRAFT_COMPONENTS_CHANGE
shell: bash
run: |
if npx lerna diff | grep -E '\.config\.draft\.ts$'; then
echo "HAS_DRAFT_COMPONENTS_CHANGE=true" >> $GITHUB_ENV
else
echo "HAS_DRAFT_COMPONENTS_CHANGE=false" >> $GITHUB_ENV
fi
- name: Computed HAS_EXECUTE_STORYBOOK_DRAFT
shell: bash
run: |
if [ "${{ env.HAS_STORYBOOK_DRAFT_SCRIPTS }}" = "true" ] && [ "${{ env.HAS_DRAFT_COMPONENTS_CHANGE }}" = "true" ]; then
echo "HAS_EXECUTE_STORYBOOK_DRAFT=true" >> $GITHUB_ENV
if npx lerna diff | grep -E '\.config\.draft\.ts$'; then
echo "HAS_EXECUTE_STORYBOOK_DRAFT=true" >> $GITHUB_ENV
else
echo "HAS_EXECUTE_STORYBOOK_DRAFT=false" >> $GITHUB_ENV
echo "HAS_EXECUTE_STORYBOOK_DRAFT=false" >> $GITHUB_ENV
fi
- name: ECHO
Expand Down

0 comments on commit d05bd03

Please sign in to comment.