Refactor GitHub Actions workflow to build Docker image and run man page generation in container

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
Stephen Simpson
2025-11-24 15:01:08 -06:00
parent 71334aca77
commit 8428dc9b1a

View File

@@ -25,39 +25,26 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: rockylinux:9
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
- name: Build Docker image
run: |
dnf install -y \
python3.11 \
python3.11-pip \
mandoc \
rpm-build \
dnf-plugins-core \
git
docker build -t rocky-man:latest .
- name: Install UV
- name: Create output directories
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
mkdir -p ./html ./tmp
- name: Install Python dependencies
- name: Build man pages in container
run: |
uv pip install --system -e .
- name: Build man pages
run: |
python3.11 -m rocky_man.main \
--versions ${{ github.event.inputs.versions || '8.10 9.5' }} \
--output-dir ./html \
--download-dir ./tmp/downloads \
--extract-dir ./tmp/extracts \
docker run --rm \
-v "$(pwd)/html:/data/html" \
-v "$(pwd)/tmp:/data/tmp" \
rocky-man:latest \
--versions ${{ github.event.inputs.versions || '8.10 9.6 10.0' }} \
--verbose
env:
PYTHONUNBUFFERED: 1