-
Notifications
You must be signed in to change notification settings - Fork 101
107 lines (93 loc) · 4.22 KB
/
build_and_archive_release_docs.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
102
103
104
105
106
107
name: Build and archive documentation from release branches
on:
push:
branches:
- 'uyuni-20[0-9][0-9].[0-9][0-9]' # Only master will build both Uyuni and SUSE Manager documentations
- 'manager-4.3-MU-4.3.[0-9][0-9]?' # Other branches will only build SUSE Manager documentation
- 'manager-5.0-alpha[0-9]' # Other branches will only build SUSE Manager documentation
- 'manager-5.0-beta[0-9]' # Other branches will only build SUSE Manager documentation
- 'manager-5.0-rc[0-9]' # Other branches will only build SUSE Manager documentation
- 'manager-5.0-gmc[0-9]' # Other branches will only build SUSE Manager documentation
- 'manager-5.0-gm' # Other branches will only build SUSE Manager documentation
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4
with:
path: uyuni-docs
- name: Checkout uyuni-docs-helper repository
uses: actions/checkout@v4
with:
path: uyuni-docs-helper
repository: uyuni-project/uyuni-docs-helper
- name: Configure environment
run: |
alias docker='podman'
mkdir outputs
- name: Build the Uyuni site documentation
run: |
rm -rf ./uyuni # Always clean before building
cd uyuni-docs-helper
./uyuni-docs-helper -r ${{ github.ref_name }} -g https://github.com/${{ github.repository}}.git -o /tmp -c antora-uyuni -p uyuni
cd ..
mkdir ./uyuni # Required so the folder name is included later in the archive
cp -r /tmp/build ./uyuni/uyuni-site
if: startsWith(github.ref_name, 'uyuni-')
- name: Archive Uyuni site Documentation
uses: actions/upload-artifact@v4
with:
name: documentation-uyuni-site-${{ github.ref_name }}
path: uyuni/
if: startsWith(github.ref_name, 'uyuni-')
- name: Build the Uyuni package documentation
run: |
rm -rf ./uyuni # Always clean before building
cd uyuni-docs-helper
./uyuni-docs-helper -r ${{ github.ref_name }} -g https://github.com/${{ github.repository}}.git -o /tmp -c obs-packages-uyuni -p uyuni
cd ..
mkdir ./uyuni # Required so the folder name is included later in the archive
cp -r /tmp/build/packages ./uyuni/uyuni-package
if: startsWith(github.ref_name, 'uyuni-')
- name: Archive Uyuni package Documentation
uses: actions/upload-artifact@v4
with:
name: documentation-uyuni-package-${{ github.ref_name }}
path: uyuni/
if: startsWith(github.ref_name, 'uyuni-')
- name: Build the SUSE Manager site documentation
run: |
rm -rf ./susemanager # Always clean before building
cd uyuni-docs-helper
./uyuni-docs-helper -r ${{ github.ref_name }} -g https://github.com/${{ github.repository}}.git -o /tmp -c antora-suma -p suma
cd ..
mkdir ./susemanager # Required so the folder name is included later in the archive
cp -r /tmp/build ./susemanager/susemanager-site
if: startsWith(github.ref_name, 'manager-')
- name: Archive SUSE Manager site Documentation
uses: actions/upload-artifact@v4
with:
name: documentation-susemanager-site-${{ github.ref_name }}
path: susemanager/
if: startsWith(github.ref_name, 'manager-')
- name: Build the SUSE Manager package documentation (only english)
run: |
rm -rf ./susemanager # Always clean before building
cd uyuni-docs-helper
./uyuni-docs-helper -r ${{ github.ref_name }} -g https://github.com/${{ github.repository}}.git -o /tmp -c obs-packages-suma-en -p suma
cd ..
mkdir ./susemanager # Required so the folder name is included later in the archive
cp -r /tmp/build/packages/ ./susemanager/susemanager-package
if: startsWith(github.ref_name, 'manager-')
- name: Archive SUSE Manager package Documentation (only english)
uses: actions/upload-artifact@v4
with:
name: documentation-susemanager-package-${{ github.ref_name }}
path: susemanager/
if: startsWith(github.ref_name, 'manager-')
- name: Archive the changelog
uses: actions/upload-artifact@v4
with:
name: changelog
path: uyuni-docs/CHANGELOG.md