diff --git a/.github/workflows/asciidoc-convert-check.yml b/.github/workflows/asciidoc-convert-check.yml new file mode 100644 index 0000000..9df28b8 --- /dev/null +++ b/.github/workflows/asciidoc-convert-check.yml @@ -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 diff --git a/cli/index.adoc b/cli/index.adoc index 751988e..24c5a91 100644 --- a/cli/index.adoc +++ b/cli/index.adoc @@ -1,6 +1,7 @@ include::../partials/attributes.adoc[] //Category: skupper-cli // Type: assembly +:context: cli [id="skupper-cli"] = Using the Skupper CLI @@ -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. diff --git a/partials/attributes.adoc b/partials/attributes.adoc index 5c95e23..2d3aa5c 100644 --- a/partials/attributes.adoc +++ b/partials/attributes.adoc @@ -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