Skip to content

Build and archive documentation from development branches #2990

Build and archive documentation from development branches

Build and archive documentation from development branches #2990

name: Build and archive documentation from development branches
on:
push:
branches:
- 'master' # Only master will build both Uyuni and SUSE Manager documentations
- 'manager-4.3' # Other branches will only build SUSE Manager documentation
- 'manager-5.0' # Other branches will only build SUSE Manager documentation
workflow_run:
workflows: ["Update translation files"] # This workflow creates commits, so we need to run after a successful run
types:
- completed
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 documentation
run: |
cd uyuni-docs-helper
./uyuni-docs-helper -r ${{ github.ref_name }} -g https://github.com/${{ github.repository}}.git -o /tmp -c antora-uyuni-en -p uyuni
cd ..
mkdir ./uyuni # Required so the folder name is included later in the archive
cp -r /tmp/build ./uyuni/uyuni
if: github.ref_name == 'master'
- name: Archive Uyuni Documentation
uses: actions/upload-artifact@v4
with:
name: documentation-uyuni-${{ github.ref_name }}
path: uyuni/
if: github.ref_name == 'master'
- name: Build the SUSE Multi-Linux Manager documentation
run: |
cd uyuni-docs-helper
./uyuni-docs-helper -r ${{ github.ref_name }} -g https://github.com/${{ github.repository}}.git -o /tmp -c antora-mlm-en -p mlm
cd ..
mkdir ./suse-multi-linux-manager # Required so the folder name is included later in the archive
cp -r /tmp/build ./suse-multi-linux-manager/suse-multi-linux-manager
- name: Archive SUSE Multi-Linux Manager Documentation
uses: actions/upload-artifact@v4
with:
name: documentation-suse-multi-linux-manager-${{ github.ref_name }}
path: suse-multi-linux-manager/