Files
truecharts/.github/workflows/wiki-create-docs.yaml
T
kjeld Schouten-Lebbing e8f9ef02d4 Cleanup, Fixes and Review Feedback
Includes mix fixes like:
- Fixing the documentation
- Making sure device and storage mounts work correctly
- Fixing broken things that where supposed to work according to the PR highlights
- Moving some additional things to TrueCharts based containers
- Hiding, changing and reordening some bad UI elements
- Adding support for supplementalGroup permissions

Co-authored-by: Dan Sheridan <dan.sheridan@postman.org.uk>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Justin Clift <justin@postgresql.org>
2021-03-12 17:18:46 +01:00

96 lines
3.5 KiB
YAML

name: "Website: Create Docs"
on:
push:
branches:
- master
tags-ignore:
- '**'
jobs:
publish-app-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout-Master
uses: actions/checkout@v2
with:
path: 'master'
token: ${{ secrets.BOT_TOKEN }}
- name: Checkout-Website
uses: actions/checkout@v2
with:
repository: 'truecharts/website'
path: 'website'
token: ${{ secrets.BOT_TOKEN }}
- name: install helm-docs
run: |
brew install norwoodj/tap/helm-docs
- name: (re)generate docs
run: |
cd master
.tools/gen-helm-docs.sh
cd ..
- name: Clean-Website
run: |
rm -Rf website/content
mkdir -p website/content
cp -f website/CNAME website/content/CNAME
- name: Create general website
run: |
cd master
cp -Rf docs/* ../website/content/
cp .github/README.md ../website/content/about/index.md || echo "readme copy failed, continuing..."
cp .github/CODE_OF_CONDUCT ../website/content/about/code_of_conduct.md || echo "CODE_OF_CONDUCT copy failed, continuing..."
cp .github/CONTRIBUTING ../website/content/development/contributing.md || echo "CONTRIBUTING copy failed, continuing..."
cp LICENSE ../website/content/about/LICENSE.md || echo "license copy failed, continuing..."
sed -i '1s/^/# License<br>\n\n/' ../website/content/about/LICENSE.md
cp NOTICE ../website/content/about/NOTICE.md || echo "license copy failed, continuing..."
sed -i '1s/^/# NOTICE<br>\n\n/' ../website/content/about/NOTICE.md
ls ../website/content/
cd ..
- name: Create apps website
run: |
cd master
for chart in charts/*; do
if [ -d "${chart}" ]; then
maxfolderversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
chartname=$(basename ${chart})
echo "Processing: ${chart} - folder: ${maxfolderversion}"
mkdir -p ../website/content/apps/${chartname} || echo "website path already exists, continuing..."
if [ -d "${chart}/${maxfolderversion}/docs" ]; then
cp -f ${chart}/${maxfolderversion}/docs/* ../website/content/apps/${chartname}/
fi
cp ${chart}/${maxfolderversion}/README.md ../website/content/apps/${chartname}/index.md || echo "readme copy failed, continuing..."
cp ${chart}/${maxfolderversion}/LICENSE ../website/content/apps/${chartname}/LICENSE.md || echo "license copy failed, continuing..."
sed -i '1s/^/# License<br>\n\n/' ../website/content/apps/${chartname}/LICENSE.md || echo "license edit failed, continuing..."
fi
done
ls ../website/content/apps/
cd ..
- name: Commit and push updated website
run: |
cd website
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Publish general website updates" || exit 0
git push
cd ..
- name: Commit and push updated charts
run: |
cd master
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Publish docs updates" || exit 0
git push