move in some install docs from downstream #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |