chore(docs): changes to CI doc generation (#3153)
* chore(docs): changes to CI doc generation * remove comment * copy icon.png to website * rename to chart-icons * ensure the correct paths exists * remove per app licenses * Apply suggestions from code review * Update .github/workflows/charts-release.yaml * Update .github/workflows/charts-release.yaml * Update .github/workflows/charts-release.yaml * update CHANGELOG tpl * another version * space between `---` * Update .github/workflows/charts-release.yaml Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
co-authored by
Kjeld Schouten-Lebbing
parent
1b5231f8ab
commit
837718944d
@@ -1,18 +1,17 @@
|
|||||||
{{ range .Versions }}
|
{{ range .Versions }}
|
||||||
<a name="{{ .Tag.Name }}"></a>
|
## [{{ .Tag.Name }}]{{ if .Tag.Previous }}({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
||||||
### {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
|
||||||
|
|
||||||
{{ range .CommitGroups -}}
|
{{ range .CommitGroups -}}
|
||||||
#### {{ .Title }}
|
### {{ .Title }}
|
||||||
|
|
||||||
{{ range .Commits -}}
|
{{ range .Commits -}}
|
||||||
* {{ .Subject }}
|
- {{ .Subject }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{- if .NoteGroups -}}
|
{{- if .NoteGroups -}}
|
||||||
{{ range .NoteGroups -}}
|
{{ range .NoteGroups -}}
|
||||||
#### {{ .Title }}
|
### {{ .Title }}
|
||||||
|
|
||||||
{{ range .Notes }}
|
{{ range .Notes }}
|
||||||
{{ .Body }}
|
{{ .Body }}
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ jobs:
|
|||||||
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
repository: truecharts/pub
|
repository: truecharts/website
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
path: pub
|
path: website
|
||||||
|
|
||||||
- name: Copy docs to website
|
- name: Copy docs to website
|
||||||
if: |
|
if: |
|
||||||
@@ -86,6 +86,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
|
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
|
||||||
|
mkdir -p website/static/img/chart-icons || echo "chart-icons path already exists, continuing..."
|
||||||
|
rm -rf website/charts/*
|
||||||
for i in "${CHARTS[@]}"
|
for i in "${CHARTS[@]}"
|
||||||
do
|
do
|
||||||
IFS='/' read -r -a chart_parts <<< "$i"
|
IFS='/' read -r -a chart_parts <<< "$i"
|
||||||
@@ -93,13 +95,11 @@ jobs:
|
|||||||
train=${chart_parts[0]}
|
train=${chart_parts[0]}
|
||||||
chart=${chart_parts[1]}
|
chart=${chart_parts[1]}
|
||||||
echo "copying docs to website for ${chart}"
|
echo "copying docs to website for ${chart}"
|
||||||
mkdir -p docs/apps/${train}/${chart} || echo "app path already exists, continuing..."
|
mkdir -p website/docs/charts/${train}/${chart} || echo "chart path already exists, continuing..."
|
||||||
yes | cp -rf charts/${train}/${chart}/README.md pub/website/apps/${train}/${chart}/index.md 2>/dev/null || :
|
yes | cp -rf charts/${train}/${chart}/README.md website/docs/charts/${train}/${chart}/index.md 2>/dev/null || :
|
||||||
yes | cp -rf charts/${train}/${chart}/CHANGELOG.md pub/website/apps/${train}/${chart}/CHANGELOG.md 2>/dev/null || :
|
yes | cp -rf charts/${train}/${chart}/CHANGELOG.md website/docs/charts/${train}/${chart}/CHANGELOG.md 2>/dev/null || :
|
||||||
yes | cp -rf charts/${train}/${chart}/security.md pub/website/apps/${train}/${chart}/security.md 2>/dev/null || :
|
yes | cp -rf charts/${train}/${chart}/docs/* website/docs/charts/${train}/${chart}/ 2>/dev/null || :
|
||||||
rm pub/website/apps/${train}/${chart}/LICENSE.md 2>/dev/null || :
|
yes | cp -rf charts/${train}/${chart}/icon.png website/static/img/chart-icons/${chart}.png 2>/dev/null || :
|
||||||
yes | cp -rf charts/${train}/${chart}/LICENSE pub/website/apps/${train}/${chart}/LICENSE.md 2>/dev/null || :
|
|
||||||
sed -i '1s/^/# License<br>\n\n/' pub/website/apps/${train}/${chart}/LICENSE.md 2>/dev/null || :
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -130,14 +130,14 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
steps.collect-changes.outputs.changesDetected == 'true'
|
steps.collect-changes.outputs.changesDetected == 'true'
|
||||||
run: |
|
run: |
|
||||||
cd pub
|
cd website
|
||||||
git config user.name "TrueCharts-Bot"
|
git config user.name "TrueCharts-Bot"
|
||||||
git config user.email "bot@truecharts.org"
|
git config user.email "bot@truecharts.org"
|
||||||
git add --all
|
git add --all
|
||||||
git commit -sm "Commit released docs for TrueCharts" || exit 0
|
git commit -sm "Commit released docs for TrueCharts" || exit 0
|
||||||
git push
|
git push
|
||||||
cd -
|
cd -
|
||||||
rm -rf pub
|
rm -rf website
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||||
@@ -198,7 +198,7 @@ jobs:
|
|||||||
git config user.name "TrueCharts-Bot"
|
git config user.name "TrueCharts-Bot"
|
||||||
git config user.email "bot@truecharts.org"
|
git config user.email "bot@truecharts.org"
|
||||||
git add --all
|
git add --all
|
||||||
git commit -sm "Commit new App releases for TrueCharts" || exit 0
|
git commit -sm "Commit new Chart releases for TrueCharts" || exit 0
|
||||||
git push
|
git push
|
||||||
cd -
|
cd -
|
||||||
rm -rf catalog
|
rm -rf catalog
|
||||||
@@ -211,7 +211,7 @@ jobs:
|
|||||||
git config user.name "TrueCharts-Bot"
|
git config user.name "TrueCharts-Bot"
|
||||||
git config user.email "bot@truecharts.org"
|
git config user.email "bot@truecharts.org"
|
||||||
git add --all
|
git add --all
|
||||||
git commit -sm "Commit new App releases for TrueCharts" || exit 0
|
git commit -sm "Commit new Chart releases for TrueCharts" || exit 0
|
||||||
git push
|
git push
|
||||||
cd -
|
cd -
|
||||||
rm -rf dh_catalog
|
rm -rf dh_catalog
|
||||||
|
|||||||
@@ -75,5 +75,7 @@ All Rights Reserved - The TrueCharts Project
|
|||||||
{{ template "custom.linking" . }}
|
{{ template "custom.linking" . }}
|
||||||
|
|
||||||
{{ template "custom.support" . }}
|
{{ template "custom.support" . }}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
{{ template "custom.copyright" . }}
|
{{ template "custom.copyright" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user