-
Notifications
You must be signed in to change notification settings - Fork 13
101 lines (91 loc) · 2.95 KB
/
docbook.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
91
92
93
94
95
96
97
98
99
100
101
name: Validate/build docs
on:
push:
paths:
- 'DC-*'
- 'xml/**'
- 'adoc/**'
- 'images/src/**'
- '**/DC-*'
- '**/xml/**'
- '**/adoc/**'
- '**/images/src/**'
jobs:
select-dc-files:
runs-on: ubuntu-latest
outputs:
validate-list: ${{ steps.select-dc-validate.outputs.dc-list }}
build-list: ${{ steps.select-dc-build.outputs.dc-list }}
allow-build: ${{ steps.select-dc-build.outputs.allow-build }}
relevant-branches: ${{ steps.select-dc-build.outputs.relevant-branches }}
steps:
- uses: actions/checkout@v4
- name: Checking basic soundness of DC files
uses: openSUSE/doc-ci@gha-select-dcs
with:
mode: soundness
- name: Selecting DC files to validate
id: select-dc-validate
uses: openSUSE/doc-ci@gha-select-dcs
with:
mode: list-validate
- name: Selecting DC files to build
id: select-dc-build
uses: openSUSE/doc-ci@gha-select-dcs
with:
mode: list-build
original-org: SUSE
validate:
runs-on: ubuntu-latest
needs: select-dc-files
strategy:
# don't cancel all validation runners when one of them fails, we want full results
fail-fast: false
matrix:
dc-files: ${{ fromJson(needs.select-dc-files.outputs.validate-list) }}
steps:
- uses: actions/checkout@v4
- name: Validating DC file(s) ${{ matrix.dc-files }}
uses: openSUSE/doc-ci@gha-validate
with:
dc-files: ${{ matrix.dc-files }}
build-html:
runs-on: ubuntu-latest
needs: [select-dc-files, validate]
if: ${{ needs.select-dc-files.outputs.allow-build == 'true' }}
outputs:
artifact-name: ${{ steps.build-dc.outputs.artifact-name }}
artifact-dir: ${{ steps.build-dc.outputs.artifact-dir }}
strategy:
matrix:
dc-files: ${{ fromJson(needs.select-dc-files.outputs.build-list) }}
steps:
- uses: actions/checkout@v4
- name: Building DC file(s) ${{ matrix.dc-files }}
id: build-dc
uses: openSUSE/doc-ci@gha-build
with:
dc-files: ${{ matrix.dc-files }}
- name: Uploading builds as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build-dc.outputs.artifact-name }}
path: ${{ steps.build-dc.outputs.artifact-dir }}/*
retention-days: 3
publish:
runs-on: ubuntu-latest
if: ${{ success() }}
needs: [select-dc-files, build-html]
continue-on-error: true
steps:
- name: Downloading all build artifacts
uses: actions/download-artifact@v4
with:
path: artifact-dir
- name: Publishing builds on susedoc.github.io
uses: openSUSE/doc-ci@gha-publish
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY_UNVERSIONED }}
with:
artifact-path: artifact-dir
relevant-dirs: ${{ needs.select-dc-files.outputs.relevant-branches }}