Skip to content

Commit

Permalink
Workflows to generate release zips
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogonzalez committed Feb 13, 2024
1 parent e157d62 commit bb4daa7
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and archive documentation from branches
name: Build and archive documentation from development branches

on:
push:
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/build-and-archive-release-docs.yml
Original file line number Diff line number Diff line change
@@ -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/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 }} -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/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-')
12 changes: 9 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,25 @@ endif::[]
:imagesdir: images


== Statuses
== Statuses and artifacts

=== Build and archive

==== Development branches

[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"]
|===

==== Release branches

Artifacts: https://github.com/uyuni-project/uyuni-docs/actions/workflows/build-and-archive-release-docs.yml

=== Find unused files

[cols="1,1"]
Expand Down

0 comments on commit bb4daa7

Please sign in to comment.