Skip to content

Commit

Permalink
Create CI-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MobiTikula authored Sep 4, 2024
1 parent 5d43c4b commit 420e3c2
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/CI-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#
# Copyright 2023 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Living Documentation Generator
on:
workflow_dispatch:

jobs:
generate-liv-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0

- uses: actions/[email protected]
with:
python-version: '3.11'

- name: Generate Living Documentation
id: generate_living_doc
uses: AbsaOSS/living-doc-generator@feature/22-Introduce-unit-test-and-code-coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repositories: '[
{
"organization-name": "absa-group",
"repository-name": "living-doc-example-project",
"query-labels": ["feature", "bug"],
"projects-title-filter": []
}
]'
project-state-mining: true
verbose-logging: false

- name: Print Documentation Path
run: |
echo "Documentation path: ${{ steps.generate_living_doc.outputs.output-path }}"
- name: List and Print Documentation Contents
run: |
# Define the documentation path from the previous step
DOC_PATH="${{ steps.generate_living_doc.outputs.output-path }}"
# Print the content of _index.md
echo "Contents of _index.md:"
cat "$DOC_PATH/_index.md"
# List all Markdown files in the directory, excluding _index.md
MD_FILES=$(find "$DOC_PATH" -type f -name '*.md' | grep -v '_index.md')
# Extract the first Markdown file from the list
FIRST_MD_FILE=$(echo "$MD_FILES" | head -n 1)
# Print the content of the first Markdown file
if [ -n "$FIRST_MD_FILE" ]; then
echo "Contents of the first Markdown file ($FIRST_MD_FILE):"
cat "$FIRST_MD_FILE"
else
echo "No additional Markdown files found."
fi

0 comments on commit 420e3c2

Please sign in to comment.