CUSP-1256 (#1)

* Complete refactor

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>

* Complete refactor

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>

---------

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
Stephen Simpson
2025-11-20 12:16:33 -05:00
committed by GitHub
parent 5248edad62
commit ec32c72363
44 changed files with 4083 additions and 1540 deletions

80
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,80 @@
# GitHub Actions workflow for building Rocky Man pages
name: Build Rocky Man Pages
on:
# Run on schedule (weekly)
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight UTC
# Allow manual trigger
workflow_dispatch:
inputs:
versions:
description: 'Rocky Linux versions to build (space-separated)'
required: false
default: '8.10 9.5'
# Run on push to main (for testing)
push:
branches:
- main
paths:
- 'src/**'
- 'templates/**'
- 'pyproject.toml'
- '.github/workflows/build.yml'
jobs:
build:
runs-on: ubuntu-latest
container:
image: rockylinux:9
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: |
dnf install -y \
python3.11 \
python3.11-pip \
mandoc \
rpm-build \
dnf-plugins-core \
git
- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Python dependencies
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 \
--verbose
env:
PYTHONUNBUFFERED: 1
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rocky-man-pages
path: html/
retention-days: 30
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
force_orphan: true