diff --git a/.github/workflows/build-and-archive-docs.yml b/.github/workflows/build-and-archive-devel-docs.yml similarity index 96% rename from .github/workflows/build-and-archive-docs.yml rename to .github/workflows/build-and-archive-devel-docs.yml index 4c7a1b41266..0cca9562891 100644 --- a/.github/workflows/build-and-archive-docs.yml +++ b/.github/workflows/build-and-archive-devel-docs.yml @@ -1,4 +1,4 @@ -name: Build and archive documentation from branches +name: Build and archive documentation from development branches on: push: diff --git a/.github/workflows/build-and-archive-release-docs.yml b/.github/workflows/build-and-archive-release-docs.yml new file mode 100644 index 00000000000..b5e828e1ca4 --- /dev/null +++ b/.github/workflows/build-and-archive-release-docs.yml @@ -0,0 +1,97 @@ +name: Build and archive documentation from release branches + +on: + push: + branches: + - 'uyuni-20[0-9][0-9].[0-9][0-9]' + - 'manager-4.3-MU-4.3.[0-9][0-9]?' + +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 }} -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 }} -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 ./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 }} -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 }} -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 ./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-') diff --git a/README.adoc b/README.adoc index 814b0a8100b..c6845e3bcef 100644 --- a/README.adoc +++ b/README.adoc @@ -52,10 +52,10 @@ endif::[] [cols="1,1"] |=== |`master` -|image:https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-docs.yml/badge.svg?branch=master["Build Status", link="https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-docs.yml"] +|image:https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-devel-docs.yml/badge.svg?branch=master["Build Status", link="https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-devel-docs.yml"] |`manager-4.3` -|image:https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-docs.yml/badge.svg?branch=manager-4.3["Build Status", link="https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-docs.yml"] +|image:https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-devel-docs.yml/badge.svg?branch=manager-4.3["Build Status", link="https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-devel-docs.yml"] |=== === Find unused files