-
Notifications
You must be signed in to change notification settings - Fork 112
84 lines (68 loc) · 2.59 KB
/
CI.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
name: CI
on:
push:
paths:
- 'Documentation/**'
- '!WebRootResources-api.typo3.org/**'
pull_request:
repository_dispatch:
jobs:
some-context-vars:
runs-on: ubuntu-latest
steps:
- name: Some vars
run: |
echo Echoing:
echo 'github.event.action :' ${{ github.event.action }}
echo 'github.event_name :' ${{ github.event_name }}
echo 'github.repository :' ${{ github.repository }}
echo 'github.sha :' ${{ github.sha }}
echo 'branch or version from GITHUB_REF:' ${{ steps.get-bv_name.outputs.branch_or_version }}
echo 'GITHUB_REF :' ${GITHUB_REF}
echo 'GITHUB_REF#refs/heads/:' ${GITHUB_REF#refs/heads/}
echo 'GITHUB_REF#refs/tags/ :' ${GITHUB_REF#refs/tags/}
on-pull_request-job:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- run: echo 'github.event_name is:' ${{ github.event_name }}
on-push-job:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- run: echo 'github.event_name is:' ${{ github.event_name }}
on-repository_dispatch-job:
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
steps:
- run: |
echo 'github.event_name is:' ${{ github.event_name }}
echo 'github.event.action is:' ${{ github.event.action }}
use-docker-container:
runs-on: ubuntu-latest
strategy:
matrix:
# online, offline
mode: ['online']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare jobfile
run: |
mkdir -p Documentation-GENERATED-temp
if [[ "${{ matrix.mode }}" = "offline" ]]; then
echo '{"Overrides_cfg":{"html_theme_options":{"docstypo3org":""}}}' > Documentation-GENERATED-temp/jobfile.json
fi
if [[ "${{ matrix.mode }}" = "online" ]]; then
echo '{"Overrides_cfg":{"html_theme_options":{"docstypo3org":"nonempty"}}}' > Documentation-GENERATED-temp/jobfile.json
fi
- name: docker run
run: |
docker run --rm --pull always -v $(pwd):/project ghcr.io/typo3-documentation/render-guides:latest --config=Documentation
- name: Verify rendering result
run: stat Documentation-GENERATED-temp/index.html || stat Documentation-GENERATED-temp/Index.html
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Rendering of ${{ github.event.repository.name }} (mode ${{ matrix.mode }})
path: ./Documentation-GENERATED-temp/