Files
rocky-man/.github/workflows/build.yml

58 lines
1.3 KiB
YAML

# GitHub Actions workflow for building Rocky Man pages
name: Build Rocky Man Pages
on:
# Allow manual trigger
workflow_dispatch:
inputs:
versions:
description: 'Rocky Linux versions to build (space-separated)'
required: false
default: '8.10 9.6 10.0'
# # 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
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t rocky-man:latest .
- name: Create output directories
run: |
mkdir -p ./html ./tmp
- name: Build man pages in container
run: |
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
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rocky-man-pages
path: html/
retention-days: 30