Skip to content

Commit a36aa93

Browse files
committed
Build and release development branches
1 parent f4acc9e commit a36aa93

File tree

1 file changed

+33
-14
lines changed

1 file changed

+33
-14
lines changed
+33-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
name: Build and Release Documentation
1+
name: Build and Release development documentation
22

33
on:
44
push:
55
branches:
66
- master # or any other branch you want to trigger the action
7+
- manager-4.3
78

89
jobs:
910
build:
@@ -12,38 +13,56 @@ jobs:
1213
steps:
1314
- name: Check out repository
1415
uses: actions/checkout@v3
16+
fetch-depth: 1
1517

16-
- name: Build documentation using Docker
18+
- name: Configure environment and download the wrapper
1719
run: |
1820
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
2124
cd uyuni-docs-helper
22-
./uyuni-docs-helper -r master -o /tmp -c antora-suma-en -p suma
2325
24-
- name: Archive Documentation
26+
- name: Build the Uyuni documentation and archive it
2527
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')
2731

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
2937
id: create_release
3038
uses: actions/create-release@v1
3139
env:
3240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3341
with:
34-
tag_name: ${{ github.ref }}
42+
tag_name: master-package
3543
release_name: Release ${{ github.ref }}
3644
body: |
37-
New release of documentation
45+
Latest build from the ${{ GITHUB_BASE_REF }} branch.
3846
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
4059

41-
- name: Upload Release Asset
60+
- name: Upload SUSE Manager package
4261
uses: actions/upload-release-asset@v1
4362
env:
4463
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4564
with:
4665
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
4968
asset_content_type: application/zip

0 commit comments

Comments
 (0)