Skip to content

Commit

Permalink
Merge pull request #2 from kedro-org/feature/include-hooks
Browse files Browse the repository at this point in the history
Add include_hooks input for the action
  • Loading branch information
ravi-kumar-pilla authored May 7, 2024
2 parents 1815a7d + 9308b90 commit e5ccc9f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ This action helps in the automation of a deployment strategy mentioned in [platf
# The Kedro-project path to build the Kedro-Viz artifacts.
# Default: '.'
project_path: ''

# The flag to include hooks while creating your Kedro-project build artifacts.
# Default: false
include_hooks: ''

# Your consent to participate in Kedro-Telemetry.
# Default: true
Expand Down
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Release 1.1.0:

## Major features and improvements

- Add `include_hooks` input for the action

# Release 1.0.0:

This is an initial release of publish-kedro-viz action
Expand Down
16 changes: 14 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: "Set your Kedro-project path to build the Kedro-Viz artifacts."
required: false
default: "."
include_hooks:
description: "Set whether to include hooks while creating your Kedro-project build artifacts."
required: false
default: false
telemetry_consent:
description: "Set your consent if you would like to participate in Kedro-Telemetry. Defaults to false"
required: false
Expand Down Expand Up @@ -57,16 +61,24 @@ runs:
cd ${{ inputs.project_path }}
echo 'consent: ${{ inputs.telemetry_consent }}' > .telemetry
shell: bash
- name: Create build flags
run: |
flag=""
if ${{ inputs.include_hooks }}; then
flag="$flag --include-hooks"
fi
echo "build_flags=$flag" >> $GITHUB_ENV
shell: bash
- name: Create build directory
run: |
cd ${{ inputs.project_path }}
if !(kedro viz build |& tee /dev/stderr | grep -i -q "Success!"); then
if !(kedro viz build ${{ env.build_flags }} |& tee /dev/stderr | grep -i -q "Success!"); then
exit 1
fi
shell: bash
- name: Deploy to GitHub Pages with publish branch as source
if: ${{ inputs.publishing_source == 'branch' }}
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ inputs.github_token }}
publish_branch: ${{ inputs.publish_branch }}
Expand Down

0 comments on commit e5ccc9f

Please sign in to comment.