forked from FluidTYPO3/vhs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Add GitHub task to generate ViewHelper docs RST
- Loading branch information
1 parent
95ef055
commit dfb01f5
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: VHS ViewHelper Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Setup PHP 7.4 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
|
||
- name: Checkout VHS project | ||
uses: actions/checkout@v2 | ||
with: | ||
path: vhs | ||
fetch-depth: 1 | ||
persist-credentials: false | ||
|
||
- name: Checkout Fluid Documentation Generator | ||
uses: actions/checkout@v2 | ||
if: {{ contains(github.event.head_commit.message, '[TASK] Update XSD schema') }} | ||
with: | ||
repository: 'TYPO3-Documentation/fluid-documentation-generator' | ||
fetch-depth: 0 | ||
path: generator | ||
|
||
- name: Generate ViewHelper RST documentation | ||
if: {{ contains(github.event.head_commit.message, '[TASK] Update XSD schema') }} | ||
working-directory: ./generator | ||
run: | | ||
echo "${{steps.set_changedfile.outputs.changedfile}}" | ||
composer install --no-dev -n -o --no-progress | ||
mkdir -p schemas/fluidtypo3/vhs/development/ | ||
cp -r ../vhs/Resources/Private/Schemas/Vhs.xsd schemas/fluidtypo3/vhs/development/schema.xsd | ||
./bin/generate-fluid-documentation | ||
find public/fluidtypo3/vhs/development -type f -name '*.xsd' -delete | ||
find public/fluidtypo3/vhs/development -type f -name '*.json' -delete | ||
find public/fluidtypo3/vhs/development -type f -name '*.html' -delete | ||
cp -r public/fluidtypo3/vhs/development/* ../vhs/Documentation/ViewHelpers/ | ||
- name: Commit and push | ||
if: {{ contains(github.event.head_commit.message, '[TASK] Update XSD schema') }} | ||
working-directory: ./vhs | ||
continue-on-error: true | ||
run: | | ||
git config user.name "FluidTYPO3 VHS" | ||
git config user.email "claus@namelesscoder.net" | ||
git add ./Documentation/ViewHelpers/* | ||
git commit -m '[TASK] Regenerate ViewHelper documentation' | ||
git push https://${{ secrets.EXEMPT_PUSH_TOKEN }}@github.com/NamelessCoder/vhs HEAD:development |