1
- name : Build and Release Documentation
1
+ name : Build and Release development documentation
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- master # or any other branch you want to trigger the action
7
+ - manager-4.3
7
8
8
9
jobs :
9
10
build :
@@ -12,38 +13,56 @@ jobs:
12
13
steps :
13
14
- name : Check out repository
14
15
uses : actions/checkout@v3
16
+ fetch-depth : 1
15
17
16
- - name : Build documentation using Docker
18
+ - name : Configure environment and download the wrapper
17
19
run : |
18
20
alias docker='podman'
19
- docker pull juliogonzalez/uyuni-docs:latest
20
- git clone https://github.com/uyuni-project/uyuni-docs-helper.git
21
+ mkdir /tmp/susemanager
22
+ mkdir /tmp/uyuni
23
+ git clone --depth 1 https://github.com/uyuni-project/uyuni-docs-helper.git
21
24
cd uyuni-docs-helper
22
- ./uyuni-docs-helper -r master -o /tmp -c antora-suma-en -p suma
23
25
24
- - name : Archive Documentation
26
+ - name : Build the Uyuni documentation and archive it
25
27
run : |
26
- zip -r documentation.zip /tmp/build
28
+ /uyuni-docs-helper -r master -o /tmp/uyuni -c antora-uyuni-en -p uyuni
29
+ zip -r documentation-uyuni.zip /tmp/uyuni/build
30
+ if : startsWith(github.ref, 'master')
27
31
28
- - name : Create Release
32
+ - name : Build the SUSE Manager documentation and archive it
33
+ ./uyuni-docs-helper -r master -o /tmp/susemanager -c antora-suma-en -p suma
34
+ zip -r documentation-susemanager.zip /tmp/susemanager/build
35
+
36
+ - name : Create or Update the ${{ GITHUB_BASE_REF }}-package release
29
37
id : create_release
30
38
uses : actions/create-release@v1
31
39
env :
32
40
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
41
with :
34
- tag_name : ${{ github.ref }}
42
+ tag_name : master-package
35
43
release_name : Release ${{ github.ref }}
36
44
body : |
37
- New release of documentation
45
+ Latest build from the ${{ GITHUB_BASE_REF }} branch.
38
46
draft : false
39
- prerelease : false
47
+ prerelease : true
48
+
49
+ - name : Upload Uyuni package
50
+ uses : actions/upload-release-asset@v1
51
+ if : startsWith(github.ref, 'master')
52
+ env :
53
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ with :
55
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
56
+ asset_path : ./documentation-uyuni.zip
57
+ asset_name : documentation-uyuni.zip
58
+ asset_content_type : application/zip
40
59
41
- - name : Upload Release Asset
60
+ - name : Upload SUSE Manager package
42
61
uses : actions/upload-release-asset@v1
43
62
env :
44
63
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
64
with :
46
65
upload_url : ${{ steps.create_release.outputs.upload_url }}
47
- asset_path : ./documentation.zip
48
- asset_name : documentation.zip
66
+ asset_path : ./documentation-susemanager .zip
67
+ asset_name : documentation-susemanager .zip
49
68
asset_content_type : application/zip
0 commit comments