From 90973235aadecccf6840ee7055a60f7a9d535a45 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 31 Dec 2023 16:51:16 +0200 Subject: [PATCH] Docs (#16682) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- .github/workflows/charts-release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index 6498ce983cd..0a0092614bf 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -186,11 +186,14 @@ jobs: echo "---" ) > website/docs/charts/${train}/${chart}/container-security.md fi + + echo "Keeping some docs safe..." # keep some docs safe mv -f website/docs/charts/${train}/${chart}/CHANGELOG.md tmp/website/docs/charts/${train}/${chart}/CHANGELOG.md || : mv -f website/docs/charts/${train}/${chart}/helm-security.md tmp/website/docs/charts/${train}/${chart}/helm-security.md || : mv -f website/docs/charts/${train}/${chart}/container-security.md tmp/website/docs/charts/${train}/${chart}/container-security.md || : + echo "Removing old docs and recreating based on charts repo..." # remove old docs everywhere and recreate based on charts repo rm -rf website/docs/charts/*/${chart} || : mkdir -p website/docs/charts/${train}/${chart} || echo "chart path already exists, continuing..." @@ -198,16 +201,19 @@ jobs: yes | cp -rf charts/${train}/${chart}/icon.png website/static/img/hotlink-ok/chart-icons/${chart}.png 2>/dev/null || : yes | cp -rf charts/${train}/${chart}/screenshots/* website/static/img/hotlink-ok/chart-screenshots/${chart}/ 2>/dev/null || : + echo "Copying back kept docs..." # Copy over kept documents mv -f tmp/website/docs/charts/${train}/${chart}/CHANGELOG.md website/docs/charts/${train}/${chart}/CHANGELOG.md 2>/dev/null || : mv -f tmp/website/docs/charts/${train}/${chart}/helm-security.md website/docs/charts/${train}/${chart}/helm-security.md 2>/dev/null || : mv -f tmp/website/docs/charts/${train}/${chart}/container-security.md website/docs/charts/${train}/${chart}/container-security.md 2>/dev/null || : + echo "Appending SCALE changelog to actual changelog..." # Append SCALE changelog to actual changelog sed -i '1d' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to sed 1d changelog..." cat "charts/${train}/${chart}/app-changelog.md" | cat - "website/docs/charts/${train}/${chart}/CHANGELOG.md" > temp && mv temp "website/docs/charts/${train}/${chart}/CHANGELOG.md" sed -i '1s/^/---\ntitle: Changelog\n---\n\n/' "website/docs/charts/${train}/${chart}/CHANGELOG.md" || echo "failed to add changelog header..." + echo "Creating index.md..." touch website/docs/charts/${train}/${chart}/index.md ( echo "---" @@ -228,6 +234,7 @@ jobs: echo "## Available Documentation" >> website/docs/charts/${train}/${chart}/index.md echo "" >> website/docs/charts/${train}/${chart}/index.md + echo "Iterating over all files in the docs directory..." # Iterate over all files in the docs directory for file in website/docs/charts/${train}/${chart}/*.md; do # Extract the file name and first line from each file