ProcessCube DocuFlow
Description
A command to generate a documentation website for BPMN diagrams.
The website is generated from a processes directory containing BPMN diagrams
and a README.md file in the root directory of your project.
Usage
- Have your BPMN diagrams in a
processes directory.
- Optional: Have a
README.md file in the root directory of your project.
with NPM
- Run
npm i -g @5minds/processcube_docuflow in the root directory of your project to install the package.
- Run
docuflow build to generate the documentation website.
- Run
docuflow serve to start the server.
- Visit
http://localhost:3000 in your browser.
with Docker
docker run -p 3000:3000 -t -i -v ./processes:/src/processes -v ./README.md:/src/README.md 5minds/processcube_docuflow
- Visit
http://localhost:3000 in your browser.
Options
Running docuflow without any arguments will show the help message.
You can set environment variables during build or serve to configure the behavior of the command:
OUT_DIR: The output directory for the build. Default: .static
BASE_PATH: The base path for the app. Default: /. Used for Path-Based Routing
PROCESSES_DIR: Custom path for processes
README_PATH: Custom path to a README.md
Development
If you want to develop and test the package locally, you can do the following:
- Clone the repository.
- Run
npm i to install the dependencies.
- Run
npm link to link the package. docuflow should be available now.
- Use the package as described in the usage section.
Running in the CI
If you want to automatically generate and deploy the documentation website in your CI workflow,
you can use the following template:
name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup Pages
id: setup-pages
uses: actions/configure-pages@v5
- name: Install DocuFlow
run: npm i -g @5minds/processcube_docuflow@develop
- name: Build Documentation
run: docuflow build
env:
BASE_PATH: ${{ steps.setup-pages.outputs.base_path }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./.static
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4