Skip to content

add sizing info (#244) #10

add sizing info (#244)

add sizing info (#244) #10

name: Convert AsciiDoc and Check Links
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: Install dependencies
run: |
gem install asciidoctor
gem install html-proofer
- name: Convert specified AsciiDoc files to HTML
run: |
mkdir -p converted_files
# List of AsciiDoc files to convert
files=(
"cli/index.adoc"
"cli/tokens.adoc"
"cli/podman.adoc"
"cli/native-security-options.adoc"
"yaml/index.adoc"
"operator/index.adoc"
"console/index.adoc"
"policy/index.adoc"
"troubleshooting/index.adoc"
"overview/connectivity.adoc"
"overview/glossary.adoc"
"overview/index.adoc"
"overview/resources.adoc"
"overview/routing.adoc"
"overview/security.adoc"
"overview/load.adoc"
"kubernetes/deployment-concerns.adoc"
)
for file in "${files[@]}"; do
# Create the target directory if it doesn't exist
target_dir=converted_files/$(dirname "$file")
mkdir -p "$target_dir"
# Convert the AsciiDoc file and maintain directory structure
asciidoctor -o "$target_dir/$(basename ${file%.adoc}.html)" "$file"
done
cp -R images converted_files/
- name: Check links in converted HTML files
#continue-on-error: true # Do not fail the job regardless of output
run: |
htmlproofer ./converted_files --disable-external