Reusable Workflows for Wrkflow packages
See https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#calling-a-reusable-workflow
Create a file .github/workflows/check.yml
Runs PHPStan (needs to be installed). with composer analyse
Runs Rector PHP (needs to be installed). with composer lint:upgrade:check
Runs ECS (needs to be installed). with composer lint:check
Runs PHP unit tests with vendor/bin/phpunit
PHP 8.1
Highest / lowest depedencies
Publishes code coverage (only on main branch, not triggered if secrets.GIST_SECRET and inputs.gistID is not set)
Using dynamic badges (Follow how to create GIST )
Use coverage.json file name
You need to create GIST and pass the id (hash) with.gistID
Ensure that GIST_SECRET is set in your repo secrets.
name : Check
on :
pull_request :
push :
branches :
- " *"
- " !gh-pages"
jobs :
run :
uses : wrk-flow/reusable-workflows/.github/workflows/php-check.yml@main
secrets : inherit
with :
gistID : hash
Create a file .github/workflows/deploy-docs.yml
Create docs folder and setup package.json with this command npm run generate
Use NuxtJS content package
Deploy will build the site and deploy docs/dist to gh-pages (which is cleaned from original source code).
Deploy on main branch
Deploy on v** tags to ensure that NuxtJS content docs theme updates Releases page
name : Documentation
on :
push :
branches :
- main
tags :
- v**
jobs :
run :
uses : wrk-flow/reusable-workflows/.github/workflows/deploy-docs.yml@main
secrets : inherit