Skip to content

Print folder tree

Actions
View the folder directory tree structure, similar to the output of the tree command
v1.2.0
Latest
Star (7)

Print Folder Tree

Buy me a coffee test

View the folder directory tree structure, similar to the output of the tree command

Example Usage

- name: Print Folder Tree
  uses: jaywcjlove/github-action-folder-tree@main
  with:
    exclude: "node_modules|dist|.git|.husky"
    path: ./src
    depth: 2

Output Project Structure

├── .lintstagedrc
├── LICENSE
├── README.md
├── action.yml
├─> build
├── package-lock.json
├── package.json
├── renovate.json
├─> src
│   └── index.ts
└── tsconfig.json
- name: Print Folder Tree
  uses: jaywcjlove/github-action-folder-tree@main
  id: tree
  with:
    exclude: "node_modules|dist|.git|.husky"
    path: ./src
    depth: 2

- name: Modify README.md
  uses: jaywcjlove/github-action-modify-file-content@main
  with:
    path: README.md
    body: ${{ steps.tree.outputs.content }}

Configure dree using JSON

- name: Print Folder Tree
  uses: jaywcjlove/github-action-folder-tree@main
  with:
    config: './docs/dree-config.json'

Inputs

  • path Folder path. (default ./)
  • depth Scan the maximum depth reachable for the given path (default 5)
  • exclude Pass a regex string to exclude directories from printing
  • config The path to the dree configuration file

Outputs

  • content Directory tree structure text

See Also

License

Licensed under the MIT License.

Print folder tree is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

View the folder directory tree structure, similar to the output of the tree command
v1.2.0
Latest

Print folder tree is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.