ensure correct website path

This commit is contained in:
Kjeld Schouten
2026-04-17 13:07:59 +02:00
parent 880e72c42d
commit 57d711ab6f
2 changed files with 17 additions and 17 deletions
+5 -5
View File
@@ -2,7 +2,7 @@
[ "$DEBUG" == 'true' ] && set -x [ "$DEBUG" == 'true' ] && set -x
[ "$STRICT" == 'true' ] && set -e [ "$STRICT" == 'true' ] && set -e
docs_base="website/src/content/docs/truetech/truecharts/charts" docs_base="website/truecharts/src/content/docs/truetech/truecharts/charts"
tmp_docs_base="tmpwebsite/src/content/docs/truetech/truecharts/charts" tmp_docs_base="tmpwebsite/src/content/docs/truetech/truecharts/charts"
safe_docs=( safe_docs=(
"CHANGELOG.md" "CHANGELOG.md"
@@ -51,10 +51,10 @@ copy_new_docs() {
local chart="$2" local chart="$2"
echo "copying new docs to website for ${chart}" echo "copying new docs to website for ${chart}"
cp -rf charts/${train}/${chart}/docs/* website/src/content/docs/truetech/truecharts/charts/${train}/${chart}/ 2>/dev/null || : cp -rf charts/${train}/${chart}/docs/* website/truecharts/src/content/docs/truetech/truecharts/charts/${train}/${chart}/ 2>/dev/null || :
cp -rf charts/${train}/${chart}/icon.webp website/public/img/hotlink-ok/chart-icons/${chart}.webp 2>/dev/null || : cp -rf charts/${train}/${chart}/icon.webp website/truecharts/public/img/hotlink-ok/chart-icons/${chart}.webp 2>/dev/null || :
cp -rf charts/${train}/${chart}/icon-small.webp website/public/img/hotlink-ok/chart-icons-small/${chart}.webp 2>/dev/null || : cp -rf charts/${train}/${chart}/icon-small.webp website/truecharts/public/img/hotlink-ok/chart-icons-small/${chart}.webp 2>/dev/null || :
cp -rf charts/${train}/${chart}/screenshots/* website/public/img/hotlink-ok/chart-screenshots/${chart}/ 2>/dev/null || : cp -rf charts/${train}/${chart}/screenshots/* website/truecharts/public/img/hotlink-ok/chart-screenshots/${chart}/ 2>/dev/null || :
} }
check_and_fix_title() { check_and_fix_title() {
+12 -12
View File
@@ -180,7 +180,7 @@ jobs:
if: github.event_name == 'push' if: github.event_name == 'push'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with: with:
repository: trueforge-org/website repository: trueforge-org/websites
path: website # checkout into ./website path: website # checkout into ./website
ref: main # branch to push to ref: main # branch to push to
token: "${{ secrets.BOT_TOKEN }}" token: "${{ secrets.BOT_TOKEN }}"
@@ -191,22 +191,22 @@ jobs:
run: | run: |
#!/bin/bash #!/bin/bash
echo "Maing sure directories exist..." echo "Maing sure directories exist..."
mkdir -p website/public/img/hotlink-ok/chart-icons || echo "chart-icons path already exists, continuing..." mkdir -p website/truecharts/public/img/hotlink-ok/chart-icons || echo "chart-icons path already exists, continuing..."
mkdir -p website/public/img/hotlink-ok/chart-icons-small || echo "chart-icons-small path already exists, continuing..." mkdir -p website/truecharts/public/img/hotlink-ok/chart-icons-small || echo "chart-icons-small path already exists, continuing..."
mkdir -p website/src/assets || echo "assets path already exists, continuing..." mkdir -p website/truecharts/src/assets || echo "assets path already exists, continuing..."
./temp/forgetool charts genchartlist ./charts ./temp/forgetool charts genchartlist ./charts
mv -f charts.json website/src/assets/charts.json mv -f charts.json website/truecharts/src/assets/charts.json
mv -f ./website/src/content/docs/truetech/truecharts/charts/description-list.mdx ./description-list.mdx mv -f ./website/truecharts/src/content/docs/truetech/truecharts/charts/description-list.mdx ./description-list.mdx
echo "Copying changelogs to docs" echo "Copying changelogs to docs"
rm -rf ./website/src/content/docs/truetech/truecharts/charts/stable ./website/src/content/docs/truetech/truecharts/charts/incubator ./website/src/content/docs/truetech/truecharts/charts/library rm -rf ./website/truecharts/src/content/docs/truetech/truecharts/charts/stable ./website/truecharts/src/content/docs/truetech/truecharts/charts/incubator ./website/truecharts/src/content/docs/truetech/truecharts/charts/library
mkdir -p ./website/src/content/docs/truetech/truecharts/charts/ mkdir -p ./website/truecharts/src/content/docs/truetech/truecharts/charts/
mv -f ./description-list.mdx ./website/src/content/docs/truetech/truecharts/charts/description-list.mdx mv -f ./description-list.mdx ./website/truecharts/src/content/docs/truetech/truecharts/charts/description-list.mdx
mkdir -p ./changelogs mkdir -p ./changelogs
# Check if there are any directories in changelogs # Check if there are any directories in changelogs
if [ -n "$(find ./changelogs -mindepth 1 -type d)" ]; then if [ -n "$(find ./changelogs -mindepth 1 -type d)" ]; then
cp -r ./changelogs/** ./website/src/content/docs/truetech/truecharts/charts/ cp -r ./changelogs/** ./website/truecharts/src/content/docs/truetech/truecharts/charts/
else else
echo "No directories in ./changelogs. Skipping copy." echo "No directories in ./changelogs. Skipping copy."
fi fi
@@ -220,8 +220,8 @@ jobs:
IFS='/' read -r -a chart_parts <<<"$item" IFS='/' read -r -a chart_parts <<<"$item"
./.github/scripts/chart-docs.sh "${chart_parts[1]}/${chart_parts[2]}" ./.github/scripts/chart-docs.sh "${chart_parts[1]}/${chart_parts[2]}"
done done
rm -rf ./website/src/content/docs/truetech/truecharts-common rm -rf ./website/truecharts/src/content/docs/truetech/truecharts-common
mv ./website/src/content/docs/truetech/truecharts/charts/library/common ./website/src/content/docs/truetech/truecharts-common mv ./website/truecharts/src/content/docs/truetech/truecharts/charts/library/common ./website/truecharts/src/content/docs/truetech/truecharts-common
- name: Prefetch contributor icons - name: Prefetch contributor icons
shell: bash shell: bash