GitHub Actions
This action wraps CLI as a GitHub Action.
Build website
Section titled “Build website”steps: - uses: actions/checkout@v4
- name: ⚙️ build uses: likec4/actions@v1 with: action: build path: src/likec4 output: dist base: /baseurl/
- name: upload artifacts uses: actions/upload-artifact@v3 with: name: likec4 path: distExport diagrams to PNG
Section titled “Export diagrams to PNG”steps: - name: export diagrams uses: likec4/actions@v1 with: export: png path: src/likec4 output: out/images use-dot-bin: 'true'Code generation
Section titled “Code generation”steps: - name: code generation uses: likec4/actions@v1 with: codegen: react output: __generated__/likec4.jsxInputs
Section titled “Inputs”| Name | Description |
|---|---|
action | Action to perform (build / export / codegen) |
export | Can be used instead of action: export |
codegen | Can be used instead of action: codegen, same values as in cli |
path | Path in repository to likec4 sources, root otherwise |
output | Output directory/file |
base | Custom baseUrl for website |
use-dot-bin | if 'true' will use dot binary of graphviz |
All inputs are optional.
By default CLI builds a website todistdirectory.