-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
59 lines (56 loc) · 1.86 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: publish-kedro-viz
description: This is a GitHub action to publish kedro viz static website on GitHub Pages
author: kedro-viz
branding:
icon: share
color: yellow
inputs:
project_path:
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
default: false
runs:
using: "composite"
steps:
- name: Install Kedro-Viz
run: |
python -m pip install --upgrade pip
python -m pip install "kedro-viz>=7.1.0"
shell: bash
- name: Consent to the use of Kedro-Telemetry
run: |
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 ${{ env.build_flags }} |& tee /dev/stderr | grep -i -q "Success!"); then
exit 1
fi
shell: bash
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
path: "${{ inputs.project_path }}/build"
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
artifact_name: github-pages-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}