One way of doing that would be using NPM.
In your package.json you can add script called allure and the value of it as allure generate "outPut dir" && allure open
This is how we have it:
"scripts": {
"test": "wdio",
"allure-reports": "node_modules/.bin/allure generate ./reports/allure/allure-results/ -o ./reports/allure/allure-report/ --clean && allure open ./reports/allure/allure-report"
}
Now while triggering the test, you can use the command npm run test && npm run allure-reports
This way, npm would first run the wdio test and once that is completed it would trigger the allure script.
Please try that and let us know whether