Skip to content

Commit 54dfd1a

Browse files
authored
Merge pull request #3 from mambax7/master
updates
2 parents 35c076c + c84aced commit 54dfd1a

3 files changed

Lines changed: 46 additions & 15 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ on:
1515
# Allow manual trigger from the GitHub UI
1616
workflow_dispatch:
1717

18+
# ── Use Node.js 24 for all actions (avoids Node 20 deprecation warnings) ──────
19+
env:
20+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
21+
1822
# ── Permissions (required for Pages deployment) ───────────────────────────────
1923
permissions:
2024
contents: read
2125
pages: write
2226
id-token: write
2327

24-
# ── Only one deployment at a time; cancel in-progress runs on new push ────────
28+
# ── Only one deployment at a time ─────────────────────────────────────────────
2529
concurrency:
2630
group: pages
2731
cancel-in-progress: true
@@ -49,28 +53,52 @@ jobs:
4953
- name: Install dependencies
5054
run: pnpm install --frozen-lockfile
5155

52-
- name: Configure GitHub Pages
53-
uses: actions/configure-pages@v5
54-
5556
- name: Build all docs sites
56-
# GITHUB_TOKEN is automatically provided — used to fetch module data
57-
# from the GitHub API without hitting the anonymous rate limit (60 req/hr)
5857
env:
58+
# Provides 5 000 req/hr GitHub API limit for module ecosystem data
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
run: pnpm build:all
6161

62-
# ── Merge both build outputs into one deploy folder ──────────────────────
63-
# Astro builds with base '/xoops-docs/2.7' → output is in dist/xoops-docs/2.7/
64-
# We strip the leading 'xoops-docs/' so dist-all/ contains just '2.7/' and '4.x/'
65-
# GitHub Pages serves xoops-docs repo at /xoops-docs/, so:
62+
# ── Debug: show what Astro produced ────────────────────────────────────
63+
# Remove this step once the first deploy is confirmed working.
64+
- name: Show dist structure
65+
run: |
66+
echo "=== docs-27/dist ==="
67+
find apps/docs-27/dist -maxdepth 4 -type f | sort | head -30
68+
echo "=== docs-4x/dist ==="
69+
find apps/docs-4x/dist -maxdepth 4 -type f | sort | head -20
70+
71+
# ── Merge both build outputs into one deploy folder ─────────────────────
72+
#
73+
# How Astro 6 static output works with base:
74+
# base: '/xoops-docs/2.7' → files land in dist/xoops-docs/2.7/
75+
# base: '/xoops-docs/4.x' → files land in dist/xoops-docs/4.x/
76+
#
77+
# We strip the leading 'xoops-docs/' so dist-all/ contains 2.7/ and 4.x/.
78+
# GitHub Pages serves the repo at /xoops-docs/, so:
6679
# dist-all/2.7/index.html → https://xoops.github.io/xoops-docs/2.7/
6780
# dist-all/4.x/index.html → https://xoops.github.io/xoops-docs/4.x/
6881
- name: Merge build outputs
6982
run: |
7083
mkdir -p dist-all
71-
# Copy content out of the nested base-path folder
72-
cp -r apps/docs-27/dist/xoops-docs/. dist-all/
73-
cp -r apps/docs-4x/dist/xoops-docs/. dist-all/
84+
85+
# Copy nested base-path content out one level
86+
if [ -d "apps/docs-27/dist/xoops-docs" ]; then
87+
cp -r apps/docs-27/dist/xoops-docs/. dist-all/
88+
else
89+
echo "WARNING: docs-27 dist/xoops-docs not found — falling back to flat copy"
90+
mkdir -p dist-all/2.7
91+
cp -r apps/docs-27/dist/. dist-all/2.7/
92+
fi
93+
94+
if [ -d "apps/docs-4x/dist/xoops-docs" ]; then
95+
cp -r apps/docs-4x/dist/xoops-docs/. dist-all/
96+
else
97+
echo "WARNING: docs-4x dist/xoops-docs not found — falling back to flat copy"
98+
mkdir -p dist-all/4.x
99+
cp -r apps/docs-4x/dist/. dist-all/4.x/
100+
fi
101+
74102
# Root redirect: /xoops-docs/ → /xoops-docs/2.7/
75103
cat > dist-all/index.html << 'EOF'
76104
<!DOCTYPE html>
@@ -86,6 +114,9 @@ jobs:
86114
</html>
87115
EOF
88116
117+
echo "=== dist-all layout ==="
118+
find dist-all -maxdepth 3 -type f | sort | head -30
119+
89120
- name: Upload Pages artifact
90121
uses: actions/upload-pages-artifact@v3
91122
with:

apps/docs-27/src/content/docs/de/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Card, CardGrid } from '@astrojs/starlight/components';
2323
<Card title="Modul-Entwickler?" icon="puzzle">
2424
Lesen Sie den [Modul-Guide](/xoops-docs/2.7/module-guide/introduction/).
2525
</Card>
26-
<Card title="Theme-Entwickler?" icon="seti:css">
26+
<Card title="Theme-Entwickler?" icon="open-book">
2727
Lesen Sie den [Theme-Guide](/xoops-docs/2.7/theme-guide/introduction/).
2828
</Card>
2929
<Card title="Upgrade?" icon="up-caret">

apps/docs-27/src/content/docs/fr/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Card, CardGrid } from '@astrojs/starlight/components';
2323
<Card title="Développeur de modules ?" icon="puzzle">
2424
Consultez le [guide des modules](/xoops-docs/2.7/module-guide/introduction/).
2525
</Card>
26-
<Card title="Développeur de thèmes ?" icon="seti:css">
26+
<Card title="Développeur de thèmes ?" icon="open-book">
2727
Consultez le [guide des thèmes](/xoops-docs/2.7/theme-guide/introduction/).
2828
</Card>
2929
<Card title="Mise à niveau ?" icon="up-caret">

0 commit comments

Comments
 (0)