-
Notifications
You must be signed in to change notification settings - Fork 5
90 lines (79 loc) · 3.05 KB
/
fluid-viewhelper.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Fluid ViewHelper Documentation
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
core: ['main', '12.4', '11.5']
fail-fast: false
env:
TARGET_PATH: ${{ secrets.API_TARGET_PATH }}/${{ matrix.core }}
steps:
- name: Setup PHP 8.1
if: matrix.core == 'main'
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Checkout Fluid Documentation Generator
uses: actions/checkout@v2
with:
repository: 'TYPO3-Documentation/fluid-documentation-generator'
fetch-depth: 0
path: generator
- name: Checkout Core ${{ matrix.core }}
uses: actions/checkout@v2
with:
repository: 'typo3/typo3'
path: core
ref: ${{ matrix.core }}
- name: Install Schema Generator
working-directory: ./core
run: |
composer require -o -n --no-progress typo3/fluid-schema-generator "^2.1"
- name: Generate Schemata
working-directory: ./core
run: |
mkdir -p ../schemas/typo3fluid/fluid/latest
./bin/generateschema TYPO3Fluid\\\Fluid > ../schemas/typo3fluid/fluid/latest/schema.xsd
mkdir -p ../schemas/typo3/core/latest
./bin/generateschema TYPO3\\\CMS\\\Core > ../schemas/typo3/core/latest/schema.xsd
mkdir -p ../schemas/typo3/fluid/latest
./bin/generateschema TYPO3\\\CMS\\\Fluid > ../schemas/typo3/fluid/latest/schema.xsd
mkdir -p ../schemas/typo3/backend/latest
./bin/generateschema TYPO3\\\CMS\\\Backend > ../schemas/typo3/backend/latest/schema.xsd
- name: Convert to Rst
working-directory: ./generator
run: |
composer install --no-dev -n -o --no-progress
cp -r ../schemas/* schemas/
./bin/generate-fluid-documentation
mkdir -p ../documentation
cp -r public/* ../documentation/
find ../documentation -type f -name '*.xsd' -delete
find ../documentation -type f -name '*.json' -delete
find ../documentation -type f -name '*.html' -delete
- name: "Checkout ViewHelper Docs: ${{ matrix.core }}"
uses: actions/checkout@v2
with:
repository: 'TYPO3-Documentation/TYPO3CMS-Reference-ViewHelper'
path: viewhelpers
ref: ${{ matrix.core }}
token: ${{ secrets.GH_PUSH_TOKEN }}
- name: Update repository
working-directory: ./viewhelpers
# - fails if there are no changes
# - keep original Documentation/Index.rst
continue-on-error: true
run: |
rm -rf Documentation/typo3 Documentation/typo3fluid
cp -r ../documentation/* Documentation/
git checkout HEAD -- Documentation/Index.rst
git config user.name "TYPO3 Documentation Team"
git config user.email "documentation-automation@typo3.com"
git add .
git commit -m '[BOT][TASK] Automatic Update of ViewHelper reference'
git push