"
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Description
11 |
12 |
13 | ## Context
14 |
15 |
16 | ## Possible Implementation
17 |
18 |
19 | ## Possible Alternatives
20 |
21 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "pip" # See documentation for possible values
9 | directory: "/package" # Location of package manifests
10 | schedule:
11 | interval: "monthly"
12 | versioning-strategy: increase-if-necessary
13 | ignore:
14 | - dependency-name: "types-*"
15 | labels:
16 | - "Python"
17 | - "dependencies"
18 |
--------------------------------------------------------------------------------
/.github/workflows/detect-secrets.yml:
--------------------------------------------------------------------------------
1 | name: Detect secrets on Publish Kedro-Viz
2 |
3 | on:
4 | push:
5 | branches:
6 | - "*"
7 | pull_request:
8 | branches:
9 | - main
10 | workflow_dispatch:
11 |
12 | jobs:
13 | detect-secrets:
14 | permissions:
15 | contents: read
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Checkout code
19 | uses: actions/checkout@v5
20 | - name: Set up Python 3.11
21 | uses: actions/setup-python@v5
22 | with:
23 | python-version: "3.11"
24 | - name: Install detect-secrets
25 | run: pip install detect-secrets
26 | - name: Scan all tracked files
27 | run: |
28 | detect-secrets scan --all-files --force-use-all-plugins
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | ## Submitting a pull request
4 |
5 | 1. Fork and clone the repository
6 | 2. Create a new branch: `git checkout -b my-branch-name`
7 | 3. Make your change and make sure the test workflow in `test.yml` still passes
8 | 4. Push to your fork and submit a pull request
9 |
10 | Here are a few things you can do that will increase the likelihood of your pull request being accepted:
11 |
12 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
13 |
14 | ## Resources
15 |
16 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
17 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
18 | - [GitHub Help](https://help.github.com)
19 | - [Writing good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
--------------------------------------------------------------------------------
/RELEASE.md:
--------------------------------------------------------------------------------
1 | # Release 3.0.0:
2 |
3 | ## Major features and improvements
4 |
5 | - Added support for [uv](https://docs.astral.sh/uv/) package manager alongside pip
6 |
7 | ## Migration Guide
8 |
9 | - **Existing users**: No action required - continues to work with pip by default
10 | - **uv users**: Add `python_manager: "uv"` to your workflow configuration
11 |
12 | **Example for uv users:**
13 |
14 | ```yaml
15 | - uses: kedro-org/publish-kedro-viz@v3
16 | with:
17 | python_manager: "uv"
18 | ```
19 |
20 | # Release 2.0.0:
21 |
22 | ## Major features and improvements
23 |
24 | - Remove usage of `peaceiris/actions-gh-pages`
25 | - Update README file
26 |
27 | # Release 1.1.0:
28 |
29 | ## Major features and improvements
30 |
31 | - Add `include_hooks` input for the action
32 |
33 | # Release 1.0.0:
34 |
35 | This is an initial release of publish-kedro-viz action
36 |
37 | ## Major features and improvements
38 |
39 | - Add initial setup for the action
40 | - Add `spaceflights-pandas-viz` Kedro starter to test the workflow
41 | - Update README file
42 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[Bug] "
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Description
11 |
12 |
13 |
14 | ## Context
15 |
16 |
17 |
18 | ## Steps to Reproduce
19 |
20 |
23 |
24 | ## Expected Result
25 |
26 |
27 |
28 | ## Actual Result
29 |
30 |
31 |
32 | ```
33 | -- If you received an error, place it here.
34 | ```
35 |
36 | ```
37 | -- Separate them if you have more than one.
38 | ```
39 |
40 | ## Your Environment
41 |
42 |
43 |
44 | * publish-kedro-viz version used:
45 | * Kedro Project dependencies (Optional):
46 | * Python version used (`python -V`):
47 | * Operating system and version:
48 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | # This workflow is used to test the GitHub action publish-kedro-viz
2 |
3 | name: Test publish-kedro-viz
4 |
5 | permissions:
6 | contents: read
7 | pages: write
8 | id-token: write
9 |
10 | on:
11 | push:
12 | branches:
13 | - "*"
14 | paths-ignore:
15 | - "*.md"
16 | pull_request:
17 | branches:
18 | - main
19 | workflow_dispatch:
20 |
21 | jobs:
22 | test-pip:
23 | runs-on: ubuntu-latest
24 | steps:
25 | - name: Fetch the repository
26 | uses: actions/checkout@v4
27 | - name: Set up Python
28 | uses: actions/setup-python@v5
29 | with:
30 | python-version: "3.11"
31 | - name: Create a Kedro Project and install project dependencies
32 | run: |
33 | python -m pip install --upgrade pip
34 | python -m pip install "kedro>=0.19.3"
35 | kedro new --starter=spaceflights-pandas --name=demo-project
36 | cd demo-project
37 | pip install -r requirements.txt
38 | - name: Deploy Kedro-Viz to GH Pages (pip)
39 | uses: ./
40 | with:
41 | project_path: "demo-project"
42 | python_manager: "pip"
43 |
44 | test-uv:
45 | runs-on: ubuntu-latest
46 | steps:
47 | - name: Fetch the repository
48 | uses: actions/checkout@v4
49 | - name: Install uv
50 | uses: astral-sh/setup-uv@v3
51 | with:
52 | enable-cache: false
53 | - name: Set up Python
54 | run: uv python install 3.11
55 | - name: Create a Kedro Project and install project dependencies
56 | run: |
57 | uv tool install "kedro>=0.19.3"
58 | kedro new --starter=spaceflights-pandas --name=demo-project
59 | cd demo-project
60 | uv venv
61 | uv pip install -r requirements.txt
62 | - name: Deploy Kedro-Viz to GH Pages (uv)
63 | uses: ./
64 | with:
65 | project_path: "demo-project"
66 | python_manager: "uv"
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security policy
2 |
3 | Kedro and its community take security bugs seriously. We appreciate efforts to improve the security of all Kedro products
4 | and follow the [GitHub coordinated disclosure of security vulnerabilities](https://docs.github.com/en/code-security/security-advisories/about-coordinated-disclosure-of-security-vulnerabilities#about-reporting-and-disclosing-vulnerabilities-in-projects-on-github)
5 | for responsible disclosure and prompt mitigation. We are committed to working with security researchers to
6 | resolve the vulnerabilities they discover.
7 |
8 | ## Supported versions
9 |
10 | The latest versions of [Publish-Kedro-Viz](https://github.com/kedro-org/publish-kedro-viz) have continued support. Any critical vulnerability will be fixed and a release will be done for the affected project as soon as possible.
11 |
12 | ## Reporting a vulnerability
13 |
14 | When finding a security vulnerability in [Publish-Kedro-Viz](https://github.com/kedro-org/publish-kedro-viz), perform the following actions:
15 |
16 | - [Open an issue](https://github.com/kedro-org/publish-kedro-viz/issues) on the publish-kedro-viz repository. Ensure that you use `(security) Security Vulnerability` as the title and _do not_ mention any vulnerability details in the issue post.
17 | - Send a notification [email](mailto:kedro-framework@mckinsey.com) to the Kedro Framework maintainers that contains, at a minimum:
18 | - The link to the filed issue stub.
19 | - Your GitHub handle.
20 | - Detailed information about the security vulnerability, evidence that supports the relevance of the finding and any reproducibility instructions for independent confirmation.
21 |
22 | This first stage of reporting is to ensure that a rapid validation can occur without wasting the time and effort of a reporter. Future communication and vulnerability resolution will be conducted after validating
23 | the veracity of the reported issue.
24 |
25 | A Kedro maintainer will, after validating the report:
26 |
27 | - Acknowledge the bug
28 | - Mark the issue with a `Blocker📛` priority
29 | - Open a draft [GitHub Security Advisory](https://docs.github.com/en/code-security/security-advisories/creating-a-security-advisory)
30 | to discuss the vulnerability details in private.
31 |
32 | The private Security Advisory will be used to confirm the issue, prepare a fix, and publicly disclose it after the fix has been released.
--------------------------------------------------------------------------------
/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # Support
2 |
3 | ## Getting Help
4 |
5 | This is an open-source project maintained by the Kedro community. We provide support through the following channels:
6 |
7 | ### Bug Reports & Feature Requests
8 | - **GitHub Issues**: [Report bugs or request features](https://github.com/kedro-org/publish-kedro-viz/issues)
9 | - **Response Time**: We aim to respond within 48-72 hours
10 |
11 | ### Community Support
12 | - **GitHub Discussions**: [Ask questions and discuss](https://github.com/kedro-org/kedro/discussions)
13 | - **Kedro Slack**: [Join the community](https://slack.kedro.org/)
14 |
15 | ### Direct Contact
16 | - **Email**: kedro-framework@mckinsey.com
17 | - **Use for**: Security vulnerabilities
18 |
19 | ## Support Policy
20 |
21 | ### What We Provide
22 | - Bug fixes for supported versions
23 | - Documentation improvements
24 | - Community-driven feature development
25 | - Security vulnerability patches
26 |
27 | ### What We Don't Provide
28 | - Guaranteed response times (best effort)
29 | - Custom development services
30 | - Paid support contracts
31 | - Refunds (free product)
32 |
33 | ### Supported Versions
34 | We support the latest major version. Security fixes may be backported to previous versions on a case-by-case basis.
35 |
36 | ## Contributing
37 | We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for details.
38 |
39 | ## Marketplace and Legal Policies
40 |
41 | ### Takedown and Termination
42 | This action is subject to GitHub's Marketplace policies and Terms of Service. In the event of:
43 |
44 | - **Policy Violations**: If this action violates GitHub Marketplace policies, GitHub may remove it from the marketplace
45 | - **Legal Issues**: DMCA takedowns or other legal challenges may result in temporary or permanent removal
46 | - **Maintenance Issues**: Severe security vulnerabilities may require immediate takedown
47 |
48 | ### Internal Response Procedures
49 | If GitHub flags or removes this action:
50 |
51 | 1. **Immediate Response** (within 24 hours):
52 | - Assess the violation or issue reported
53 | - Contact kedro-framework@mckinsey.com immediately
54 | - Document the circumstances and GitHub's reasoning
55 |
56 | 2. **Remediation** (within 48-72 hours):
57 | - Address technical issues, security vulnerabilities, or policy violations
58 | - Implement necessary fixes in the codebase
59 | - Prepare documentation of remediation efforts
60 |
61 | 3. **User Communication**:
62 | - Update repository README with status information
63 | - Create GitHub issue explaining the situation to users
64 | - Provide alternative solutions if action remains unavailable
65 |
66 | ### Contact for Legal Matters
67 | - **Security Issues**: Follow our [Security Policy](SECURITY.md)
68 | - **Legal/Compliance**: kedro-framework@mckinsey.com
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behaviour that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behaviour by participants include:
24 |
25 | * The use of sexualised language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behaviour and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behaviour.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviours that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behaviour may be
58 | reported by contacting the project team on [Slack](https://slack.kedro.org). All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | **Investigation Timeline:** The project team will make all reasonable efforts to initiate and conclude the investigation in a timely fashion. Depending on the type of investigation the steps and timeline for each investigation will vary.
69 |
70 | ## Attribution
71 |
72 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
73 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
74 |
75 | [homepage]: https://www.contributor-covenant.org
76 |
77 | For answers to common questions about this code of conduct, see
78 | https://www.contributor-covenant.org/faq
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # publish-kedro-viz
2 |
3 | # Byte-compiled / optimized / DLL files
4 | __pycache__/
5 | *.py[cod]
6 | *$py.class
7 |
8 | # C extensions
9 | *.so
10 |
11 | # Distribution / packaging
12 | .Python
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib/
20 | lib64/
21 | parts/
22 | sdist/
23 | var/
24 | wheels/
25 | share/python-wheels/
26 | *.egg-info/
27 | .installed.cfg
28 | *.egg
29 | MANIFEST
30 |
31 | # PyInstaller
32 | # Usually these files are written by a python script from a template
33 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
34 | *.manifest
35 | *.spec
36 |
37 | # Installer logs
38 | pip-log.txt
39 | pip-delete-this-directory.txt
40 |
41 | # Unit test / coverage reports
42 | htmlcov/
43 | .tox/
44 | .nox/
45 | .coverage
46 | .coverage.*
47 | .cache
48 | nosetests.xml
49 | coverage.xml
50 | *.cover
51 | *.py,cover
52 | .hypothesis/
53 | .pytest_cache/
54 | cover/
55 |
56 | # Translations
57 | *.mo
58 | *.pot
59 |
60 | # Django stuff:
61 | *.log
62 | local_settings.py
63 | db.sqlite3
64 | db.sqlite3-journal
65 |
66 | # Flask stuff:
67 | instance/
68 | .webassets-cache
69 |
70 | # Scrapy stuff:
71 | .scrapy
72 |
73 | # Sphinx documentation
74 | docs/_build/
75 |
76 | # PyBuilder
77 | .pybuilder/
78 | target/
79 |
80 | # Jupyter Notebook
81 | .ipynb_checkpoints
82 |
83 | # IPython
84 | profile_default/
85 | ipython_config.py
86 |
87 | # pyenv
88 | # For a library or package, you might want to ignore these files since the code is
89 | # intended to run in multiple environments; otherwise, check them in:
90 | # .python-version
91 |
92 | # pipenv
93 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
95 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
96 | # install all needed dependencies.
97 | #Pipfile.lock
98 |
99 | # poetry
100 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101 | # This is especially recommended for binary packages to ensure reproducibility, and is more
102 | # commonly ignored for libraries.
103 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104 | #poetry.lock
105 |
106 | # pdm
107 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108 | #pdm.lock
109 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110 | # in version control.
111 | # https://pdm.fming.dev/#use-with-ide
112 | .pdm.toml
113 |
114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115 | __pypackages__/
116 |
117 | # Celery stuff
118 | celerybeat-schedule
119 | celerybeat.pid
120 |
121 | # SageMath parsed files
122 | *.sage.py
123 |
124 | # Environments
125 | .env
126 | .venv
127 | env/
128 | venv/
129 | ENV/
130 | env.bak/
131 | venv.bak/
132 |
133 | # Spyder project settings
134 | .spyderproject
135 | .spyproject
136 |
137 | # Rope project settings
138 | .ropeproject
139 |
140 | # mkdocs documentation
141 | /site
142 |
143 | # mypy
144 | .mypy_cache/
145 | .dmypy.json
146 | dmypy.json
147 |
148 | # Pyre type checker
149 | .pyre/
150 |
151 | # pytype static type analyzer
152 | .pytype/
153 |
154 | # Cython debug symbols
155 | cython_debug/
156 |
157 | # PyCharm
158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160 | # and can be added to the global gitignore or merged into this file. For a more nuclear
161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162 | #.idea/
163 |
--------------------------------------------------------------------------------
/PRIVACY.md:
--------------------------------------------------------------------------------
1 | # Privacy Policy
2 |
3 | ## Privacy Notice
4 |
5 | **No personal data is collected or stored by this GitHub Action.** This Action only processes your Kedro project files locally within the GitHub Actions runner environment to generate static visualization artifacts.
6 |
7 | ## Data Processing Summary
8 |
9 | - **Data Processed**: Kedro project configuration files, pipeline definitions, and metadata
10 | - **Processing Location**: GitHub Actions runner (ephemeral environment)
11 | - **Data Storage**: No persistent data storage by this Action
12 | - **Data Transmission**: Only static HTML/JS/CSS artifacts uploaded to GitHub Pages
13 |
14 | ## Telemetry and Opt-Out
15 |
16 | This Action includes an optional telemetry feature input that controls whether the Kedro framework sends usage data to Kedro Org. The Action does not collect any telemetry data directly - it only sets the telemetry consent configuration for your Kedro project by writing the consent value to the `.telemetry` file.
17 |
18 | - **Default Setting**: Telemetry is **disabled by default** (`telemetry_consent: false`)
19 | - **Opt-In Required**: You must explicitly set `telemetry_consent: true` to enable
20 | - **Data Sent**: Anonymous usage statistics about Kedro-Viz features used
21 | - **Opt-Out Instructions**: Keep `telemetry_consent: false` (default) or omit the parameter
22 |
23 | ### How to Disable Telemetry Explicitly
24 |
25 | ```yaml
26 | - uses: kedro-org/publish-kedro-viz@v3
27 | with:
28 | telemetry_consent: false # Explicitly disable (default)
29 | ```
30 |
31 | ## GDPR/CCPA Compliance
32 |
33 | This Action complies with GitHub's Data Protection Addendum and applicable data protection regulations:
34 |
35 | - No personal data collection or processing
36 | - No cookies or tracking mechanisms
37 | - No data retention beyond GitHub Actions job execution
38 | - Processing limited to generating static visualizations
39 |
40 | ## Data Controller Information
41 |
42 | **Organization**: Kedro Community (kedro-org)
43 | **Contact**: kedro-framework@mckinsey.com
44 | **Purpose**: Data pipeline visualization and documentation
45 |
46 | ## Your Rights
47 |
48 | Under applicable data protection laws, you have the following rights:
49 |
50 | - **Right to Information**: This privacy policy provides information about our data processing
51 | - **Right to Access**: You can request information about any data processing (though we process no personal data)
52 | - **Right to Rectification**: You can request correction of inaccurate data (not applicable as we process no personal data)
53 | - **Right to Erasure**: You can request deletion of personal data (not applicable as we process no personal data)
54 | - **Right to Object**: You can object to data processing by not using this Action or disabling telemetry
55 |
56 | ## Third-Party Services
57 |
58 | This Action uses the following third-party services:
59 |
60 | ### GitHub Actions Platform
61 | - **Service**: GitHub Actions runner environment
62 | - **Data Shared**: Repository contents during workflow execution
63 | - **Privacy Policy**: [GitHub Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement)
64 |
65 | ### GitHub Pages
66 | - **Service**: Static website hosting
67 | - **Data Shared**: Generated HTML/JS/CSS artifacts
68 | - **Privacy Policy**: [GitHub Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement)
69 |
70 | ### Kedro-Viz Telemetry (Optional)
71 | - **Service**: Anonymous usage analytics (only if explicitly enabled)
72 | - **Data Shared**: Anonymous feature usage statistics
73 | - **Control**: Disabled by default, requires explicit opt-in
74 |
75 | ### Third-Party GitHub Actions
76 |
77 | This Action integrates with the following third-party GitHub Actions:
78 |
79 | #### actions/upload-pages-artifact
80 | - **Author**: GitHub (actions organization)
81 | - **Purpose**: Upload build artifacts for GitHub Pages deployment
82 | - **Data Shared**: Generated static website files (HTML/JS/CSS)
83 | - **License**: MIT
84 | - **Repository**: [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact)
85 |
86 | #### actions/deploy-pages
87 | - **Author**: GitHub (actions organization)
88 | - **Purpose**: Deploy artifacts to GitHub Pages
89 | - **Data Shared**: Build artifacts for website deployment
90 | - **License**: MIT
91 | - **Repository**: [actions/deploy-pages](https://github.com/actions/deploy-pages)
92 |
93 | #### peaceiris/actions-gh-pages (v1 only)
94 | - **Author**: peaceiris
95 | - **Purpose**: Deploy static site to GitHub Pages branch (legacy v1 functionality)
96 | - **Data Shared**: Generated static website files
97 | - **License**: MIT
98 | - **Repository**: [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages)
99 | - **Note**: Used only in v1 of this Action for branch-based deployments
100 |
101 | ## Changes to This Policy
102 |
103 | We may update this privacy policy from time to time. Changes will be reflected in the repository commit history and users will be notified through:
104 |
105 | - Updates to this PRIVACY.md file
106 | - Release notes for new versions
107 | - Repository announcements for significant changes
108 |
109 | ## Contact
110 |
111 | For questions about data protection or this privacy policy:
112 |
113 | - **Email**: kedro-framework@mckinsey.com
114 | - **Security Issues**: See [SECURITY.md](SECURITY.md)
115 | - **General Support**: See [SUPPORT.md](SUPPORT.md)
116 |
117 | ---
118 |
119 | **Last Updated**: November 19, 2024
120 | **Version**: 1.0
--------------------------------------------------------------------------------
/action.yml:
--------------------------------------------------------------------------------
1 | name: 'Publish Kedro-Viz to GitHub Pages'
2 | description: 'Build and publish interactive Kedro pipeline visualizations to GitHub Pages'
3 | author: 'kedro-org'
4 |
5 | branding:
6 | icon: share
7 | color: yellow
8 |
9 | inputs:
10 | project_path:
11 | description: "Set your Kedro-project path to build the Kedro-Viz artifacts."
12 | required: false
13 | default: "."
14 | include_hooks:
15 | description: "Set whether to include hooks while creating your Kedro-project build artifacts."
16 | required: false
17 | default: "false"
18 | telemetry_consent:
19 | description: "Set your consent if you would like to participate in Kedro-Telemetry. Defaults to false"
20 | required: false
21 | default: "false"
22 | python_manager:
23 | description: "Set the Python package manager to use ('pip' or 'uv'). Defaults to 'pip'"
24 | required: false
25 | default: "pip"
26 | auto_deploy:
27 | description: >
28 | Control automatic deployment to GitHub Pages. Set to 'false' to only
29 | build and upload artifacts without deploying. Defaults to 'true'
30 | required: false
31 | default: "true"
32 | deployment_check:
33 | description: >
34 | Check if GitHub Pages is configured before deploying. Set to 'false'
35 | to skip safety checks. Defaults to 'true'
36 | required: false
37 | default: "true"
38 |
39 | runs:
40 | using: "composite"
41 | steps:
42 | - name: Install Kedro-Viz
43 | run: |
44 | cd ${{ inputs.project_path }}
45 | if [ "${{ inputs.python_manager }}" = "uv" ]; then
46 | # For uv, try uv add first (for proper uv projects), fallback to uv pip install
47 | if ! uv add "kedro-viz>=7.1.0" 2>/dev/null; then
48 | echo "uv add failed, falling back to uv pip install..."
49 | uv pip install "kedro-viz>=7.1.0"
50 | fi
51 | else
52 | # For pip, use the traditional approach
53 | python -m pip install --upgrade pip
54 | python -m pip install "kedro-viz>=7.1.0"
55 | fi
56 | shell: bash
57 | - name: Consent to the use of Kedro-Telemetry
58 | run: |
59 | cd ${{ inputs.project_path }}
60 | if [ "${{ inputs.telemetry_consent }}" = "true" ]; then
61 | echo 'consent: true' > .telemetry
62 | else
63 | echo 'consent: false' > .telemetry
64 | fi
65 | shell: bash
66 | - name: Create build flags
67 | run: |
68 | flag=""
69 | if [ "${{ inputs.include_hooks }}" = "true" ]; then
70 | flag="$flag --include-hooks"
71 | fi
72 | echo "build_flags=$flag" >> $GITHUB_ENV
73 | shell: bash
74 | - name: Create build directory
75 | run: |
76 | cd ${{ inputs.project_path }}
77 | if [ "${{ inputs.python_manager }}" = "uv" ]; then
78 | if !(uv run kedro viz build ${{ env.build_flags }} |& tee /dev/stderr | grep -i -q "Success!"); then
79 | exit 1
80 | fi
81 | else
82 | if !(kedro viz build ${{ env.build_flags }} |& tee /dev/stderr | grep -i -q "Success!"); then
83 | exit 1
84 | fi
85 | fi
86 | shell: bash
87 | - name: Check GitHub Pages configuration
88 | if: inputs.deployment_check == 'true'
89 | run: |
90 | echo "Checking GitHub Pages configuration..."
91 |
92 | # Check if Pages is enabled via GitHub API with proper error handling
93 | HTTP_CODE=$(curl -s -w "%{http_code}" -H "Authorization: token ${{ github.token }}" \
94 | "https://api.github.com/repos/${{ github.repository }}/pages" \
95 | -o /tmp/pages_response.json)
96 |
97 | echo "GitHub Pages API response code: $HTTP_CODE"
98 |
99 | if [ "$HTTP_CODE" = "404" ]; then
100 | echo "WARNING: GitHub Pages is not enabled for this repository."
101 | echo "Please enable GitHub Pages in repository settings before deploying."
102 | echo "Go to Settings > Pages and configure a publishing source."
103 | echo "To skip this check, set deployment_check: false"
104 |
105 | if [ "${{ inputs.auto_deploy }}" = "true" ]; then
106 | echo "Deployment cancelled - GitHub Pages is not enabled."
107 | exit 1
108 | fi
109 | else
110 | echo "GitHub Pages is enabled, proceeding to uploading artifacts."
111 | fi
112 |
113 | # Clean up
114 | rm -f /tmp/pages_response.json
115 | shell: bash
116 | - name: Upload GitHub Pages artifact
117 | run: |
118 | echo "Uploading build artifacts to GitHub Pages..."
119 | echo "Artifact will be named: github-pages-${{ inputs.python_manager }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
120 | shell: bash
121 | - name: Upload artifact
122 | uses: actions/upload-pages-artifact@v3
123 | with:
124 | name: github-pages-${{ inputs.python_manager }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
125 | path: "${{ inputs.project_path }}/build"
126 | - name: Deploy to GitHub Pages
127 | if: inputs.auto_deploy == 'true'
128 | run: |
129 | echo "Deploying to GitHub Pages..."
130 | echo "Auto-deploy is enabled. To disable, set auto_deploy: false"
131 | shell: bash
132 | - name: Deploy artifact
133 | if: inputs.auto_deploy == 'true'
134 | uses: actions/deploy-pages@v4
135 | with:
136 | artifact_name: github-pages-${{ inputs.python_manager }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
137 | - name: Deployment skipped notice
138 | if: inputs.auto_deploy == 'false'
139 | run: |
140 | echo "WARNING: Auto-deployment is disabled."
141 | echo "Artifacts have been uploaded but not deployed."
142 | echo "To deploy manually, use the GitHub Pages settings or set auto_deploy: true"
143 | shell: bash
144 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Publish-kedro-viz
2 |
3 |
4 |
8 |
12 |
13 |
14 |
15 |
16 |
23 | ✨ Data Science Pipelines. Beautifully Designed ✨
24 |
25 | Live Demo: https://demo.kedro.org/
26 |
27 |
28 |
29 |
30 | ## Overview
31 |
32 | Publish-kedro-viz is a GitHub action that simplifies the process of deploying Kedro-viz, which is a visual representation of your Kedro project, directly within the Git repository where your Kedro project is stored. By using this action, you can effortlessly showcase your Kedro-viz on GitHub Pages.
33 |
34 | This action helps in the automation of a deployment strategy mentioned in [platform agnostic sharing with Kedro-Viz](https://docs.kedro.org/projects/kedro-viz/en/stable/platform_agnostic_sharing_with_kedro_viz/)
35 |
36 | ## Prerequisites
37 |
38 | - **GitHub Repository:** A GitHub repository with your Kedro project.
39 | - **GitHub Pages Setup:** Configure your repository for [GitHub Pages](https://docs.github.com/en/pages/quickstart).
40 | - **Kedro-project dependencies:** Install all the Kedro-project dependencies before using this action in your workflow.
41 | - **Python-version:** You need to have an environment with `python>=3.10` in your workflow.
42 |
43 | > [!NOTE]
44 | > While configuring your repository for GitHub Pages, you have two publishing source options. You can either choose a branch or a custom GitHub Actions workflow (recommended).
45 | > If you choose a branch, the build artifacts will be uploaded to the `publish_branch` you pass as an input to the action, which defaults to `gh-pages`.
46 | > If you choose a custom GitHub Actions workflow, you need to mention that in the input `publishing_source` to the action. In this case, no branch will be created and the artifacts are deployed at run-time.
47 |
48 | > [!TIP]
49 | > Please find more information on configuring a publishing source for github pages site in the [official docs](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
50 |
51 | > [!Important]
52 | > From `publish-kedro-viz@v2`, we only support custom GitHub Actions workflow as a publishing source for GitHub Pages.
53 | > From `publish-kedro-viz@v3`, we introduced inputs to support uv managed kedro projects, deployment safety checks and dropped python 3.9 support.
54 |
55 | ## Usage
56 |
57 | 1. With `kedro-org/publish-kedro-viz@v3`:
58 |
59 | ```yaml
60 |
61 | - uses: kedro-org/publish-kedro-viz@v3
62 | with:
63 | # The Kedro-project path to build the Kedro-Viz artifacts.
64 | # Default: '.'
65 | project_path: ''
66 |
67 | # The flag to include hooks while creating your Kedro-project build artifacts.
68 | # Default: false
69 | include_hooks: ''
70 |
71 | # Your consent to participate in Kedro-Telemetry.
72 | # Default: false
73 | telemetry_consent: ''
74 |
75 | # The Python package manager to use ('pip' or 'uv').
76 | # Default: 'pip'
77 | python_manager: ''
78 |
79 | # Control automatic deployment to GitHub Pages.
80 | # Set to 'false' to only build artifacts without deploying.
81 | # Default: 'true'
82 | auto_deploy: ''
83 |
84 | # Check if GitHub Pages is configured before deploying.
85 | # Set to 'false' to skip safety checks.
86 | # Default: 'true'
87 | deployment_check: ''
88 |
89 | ```
90 |
91 | 2. With `kedro-org/publish-kedro-viz@v2`:
92 |
93 | ```yaml
94 |
95 | - uses: kedro-org/publish-kedro-viz@v2
96 | with:
97 | # The Kedro-project path to build the Kedro-Viz artifacts.
98 | # Default: '.'
99 | project_path: ''
100 |
101 | # The flag to include hooks while creating your Kedro-project build artifacts.
102 | # Default: false
103 | include_hooks: ''
104 |
105 | # Your consent to participate in Kedro-Telemetry.
106 | # Default: true
107 | telemetry_consent: ''
108 |
109 | ```
110 |
111 | 3. With `kedro-org/publish-kedro-viz@v1`:
112 |
113 | ```yaml
114 |
115 | - uses: kedro-org/publish-kedro-viz@v1
116 | with:
117 | # The GitHub token to authenticate deployment. This is autogenerated by the action.
118 | # Default: ${{ github.token }}
119 | github_token: ''
120 |
121 | # The Kedro-project path to build the Kedro-Viz artifacts.
122 | # Default: '.'
123 | project_path: ''
124 |
125 | # The flag to include hooks while creating your Kedro-project build artifacts.
126 | # Default: false
127 | include_hooks: ''
128 |
129 | # Your consent to participate in Kedro-Telemetry.
130 | # Default: true
131 | telemetry_consent: ''
132 |
133 | # The publishing source for GitHub pages. This can be either
134 | # 'branch' or 'workflow' based on your GitHub Pages configuration
135 | # Default: 'branch'
136 | publishing_source: ''
137 |
138 | # The GitHub pages publish branch to upload the artifacts
139 | # if your publishing_source is a branch
140 | # Default: 'gh-pages'
141 | publish_branch: ''
142 |
143 | # The commit message for the deployment, if your publishing_source is a branch.
144 | # Defaults to your original commit message.
145 | # Default: ${{ github.event.head_commit.message }}
146 | commit_message: ''
147 |
148 | # An option to publish branch with only the latest commit
149 | # if your publishing_source is a branch.
150 | # Default: true
151 | force_orphan: ''
152 |
153 | # The git config user.name or the owner of the commit.
154 | # if your publishing_source is a branch.
155 | # Default: 'github-actions[bot]'
156 | user_name: ''
157 |
158 | # The git config user.email or the email of the commit owner.
159 | # if your publishing_source is a branch.
160 | # Default: 'github-actions[bot]@users.noreply.github.com'
161 | user_email: ''
162 |
163 | ```
164 |
165 | ## Deployment Control Options (from v3)
166 |
167 | ### Auto-Deploy Control
168 |
169 | By default, this action automatically deploys to GitHub Pages after building artifacts. You can control this behavior:
170 |
171 | **Build Only (No Deploy):**
172 | ```yaml
173 | - uses: kedro-org/publish-kedro-viz@v3
174 | with:
175 | auto_deploy: false # Only build artifacts, don't deploy
176 | ```
177 |
178 | **Skip Safety Checks:**
179 | ```yaml
180 | - uses: kedro-org/publish-kedro-viz@v3
181 | with:
182 | deployment_check: false # Skip GitHub Pages configuration check
183 | ```
184 |
185 | ### Safety Features
186 |
187 | - **GitHub Pages Configuration Check**: Verifies Pages is configured before deploying
188 | - **Opt-out Control**: Set `auto_deploy: false` to prevent automatic deployment
189 | - **Clear Feedback**: Action provides clear messages about deployment status
190 |
191 | ## Configure the action
192 |
193 | 1. Adding the GitHub Action to your workflow:
194 |
195 | 1. Create a workflow file in your repository: `.github/workflows/publish-kedro-viz.yml`
196 | 2. Add the following code to the workflow file:
197 |
198 | ```yaml
199 | # An example workflow configuration assuming your kedro project is
200 | # at the root directory
201 |
202 | # The name of your workflow
203 | name: Publish and share Kedro Viz
204 |
205 | permissions:
206 |
207 | # The contents write permission is required to use the action
208 | # if your GitHub publishing source is a branch
209 |
210 | # The contents read permission is required to use the action
211 | # if your GitHub publishing source is a workflow
212 | contents: read
213 |
214 | # The pages and id-token write permissions are required to use
215 | # the action if your GitHub publishing source is a custom
216 | # GitHub Actions workflow
217 | pages: write
218 | id-token: write
219 |
220 | on:
221 | # This can be configured based on your requirements
222 | # (i.e., the workflow trigger condition)
223 | pull_request:
224 | push:
225 | branches:
226 | - main
227 | workflow_dispatch:
228 |
229 | # We mentioned the minimal jobs for the workflow
230 | jobs:
231 | deploy:
232 | # The action is currently tested on ubuntu-latest (Recommended)
233 | runs-on: ubuntu-latest
234 | steps:
235 | - name: Fetch the repository
236 | uses: actions/checkout@v4
237 | - name: Set up Python
238 | uses: actions/setup-python@v5
239 | with:
240 | # Requires python >= 3.9
241 | python-version: 3.11
242 | # This installs the Kedro-project dependencies
243 | - name: Install Project Dependencies
244 | run: |
245 | python -m pip install --upgrade pip
246 | pip install -r requirements.txt
247 | # Using the action
248 | - name: Deploy Kedro-Viz to GH Pages
249 | uses: kedro-org/publish-kedro-viz@v3
250 |
251 | ```
252 |
253 | ### Using with uv
254 |
255 | If your project uses [uv](https://docs.astral.sh/uv/) for dependency management, you can configure the workflow like this:
256 |
257 | ```yaml
258 | name: Publish and share Kedro Viz
259 |
260 | permissions:
261 | contents: read
262 | pages: write
263 | id-token: write
264 |
265 | on:
266 | push:
267 | branches:
268 | - main
269 | workflow_dispatch:
270 |
271 | jobs:
272 | deploy:
273 | runs-on: ubuntu-latest
274 | steps:
275 | - name: Fetch the repository
276 | uses: actions/checkout@v4
277 | - name: Install uv
278 | uses: astral-sh/setup-uv@v3
279 | - name: Set up Python
280 | run: uv python install 3.11
281 | - name: Install Project Dependencies
282 | run: |
283 | cd your-project-path
284 | uv pip install -r requirements.txt
285 | - name: Deploy Kedro-Viz to GH Pages
286 | uses: kedro-org/publish-kedro-viz@v3
287 | with:
288 | project_path: "your-project-path"
289 | python_manager: "uv"
290 | ```
291 |
292 | ## Test the action
293 |
294 | After you've completed the configuration, trigger the workflow as per the workflow trigger condition.
295 |
296 | - Once triggered, the GitHub workflow "Publish and share Kedro Viz" will automatically start and can be found in the Actions tab with your commit message.
297 | - If your GitHub Pages publishing source is a custom GitHub Actions workflow (recommended), then the artifacts of your Kedro-Viz static site will be uploaded and deployed during the workflow run-time.
298 | - If your GitHub Pages publishing source is a branch, then the artifacts of your Kedro-Viz static site will be uploaded to the publish-branch input specified in the action upon successful completion of the workflow. Please note that starting from v2, we will not support GitHub Pages publishing source as a branch.
299 | - You can access the static site at `http://.github.io/`, if your site's visibility is public. For more information on changing the visibility, you can follow the [official docs](https://docs.github.com/en/enterprise-cloud@latest/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site)
300 |
301 | ## Credits
302 |
303 | The list of third party actions used in this project, with due credits to their authors and license terms. More details can be found inside the folder of each action.
304 |
305 | ### Deploy to GitHub Pages when publishing source is a branch
306 |
307 | We use the GitHub action [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) in v1, to deploy the static site to a publish branch which is released under MIT license.
308 |
309 | ### Deploy to GitHub Pages when publishing source is a custom GitHub Action Workflow
310 |
311 | We use the GitHub actions [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) and [actions/deploy-pages](https://github.com/actions/deploy-pages) which are released under MIT license.
312 |
313 | ## Privacy and Data Protection
314 |
315 | **This Action collects no personal data and processes only your project files locally.**
316 |
317 | For complete privacy information including:
318 | - Data processing details
319 | - Telemetry opt-out instructions
320 | - GDPR/CCPA compliance
321 | - Your privacy rights
322 |
323 | **See our [Privacy Policy](PRIVACY.md)**
324 |
325 | ## Support
326 |
327 | Need help? We're here for you!
328 |
329 | **See our [SUPPORT.md](SUPPORT.md)** for complete support policy and takedown procedures
330 |
331 | ## Pricing
332 |
333 | This action is open-source and available at no cost for:
334 | - Personal projects
335 | - Commercial use
336 | - Enterprise organizations
337 | - No usage limits
338 |
339 | ## License
340 |
341 | publish-kedro-viz is licensed under the [Apache 2.0](https://github.com/kedro-org/publish-kedro-viz/blob/main/LICENSE.md) License.
342 |
--------------------------------------------------------------------------------