Skip to content

Commit

Permalink
Add html checks (#242)
Browse files Browse the repository at this point in the history
* add checks to html
  • Loading branch information
pwright authored May 28, 2024
1 parent ac53f04 commit 9bc3ba9
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 4 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/asciidoc-convert-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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"
"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
3 changes: 2 additions & 1 deletion cli/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include::../partials/attributes.adoc[]
//Category: skupper-cli
// Type: assembly
:context: cli
[id="skupper-cli"]
= Using the Skupper CLI

Expand All @@ -18,7 +19,7 @@ Installing the `skupper` command-line interface (CLI) provides a simple method t
.Procedure

// tag::skupper-io[]
. Follow the instructions for link:/install/index.html[Installing Skupper].
. Follow the instructions for link:https://skupper.io/install/index.html[Installing Skupper].
// end::skupper-io[]

. Verify the installation.
Expand Down
6 changes: 3 additions & 3 deletions partials/attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
:routing-link: ../overview/routing.html[Routing]
:connectivity-link: ../overview/connectivity.html[Connectivity]
:glossary-link: ../overview/glossary.html[Glossary]
:kube-ref-link: ../kubernetes-reference/index.html[Skupper Kubernetes CLI reference]
:pod-ref-link: ../podman-reference/index.html[Skupper Podman CLI reference]
:cost-link: ../cli/index.html#specifying-link-cost[Specifying link cost]
:kube-ref-link: https://skupper.io/docs/kubernetes-reference/index.html[Skupper Kubernetes CLI reference]
:pod-ref-link: https://skupper.io/docs/kubernetes-reference/index.html[Skupper Podman CLI reference]
:cost-link: ../cli/index.html#cli_link-cost[Specifying link cost]


:skupper-operator-name: Skupper operator
Expand Down

0 comments on commit 9bc3ba9

Please sign in to comment.