Skip to content

Commit 21919ac

Browse files
committed
refactored
1 parent 1ed8b92 commit 21919ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+70
-741
lines changed

.github/workflows/deploy-docmd.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy Hybrid Site
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build-and-deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
# --- 1. Build docmd (The Documentation) ---
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: '22'
33+
34+
- name: Install and Build docmd
35+
working-directory: ./docmd
36+
run: |
37+
npm install
38+
npm install -g @mgks/docmd
39+
docmd build
40+
41+
# --- 2. Merge Sites into One Folder ---
42+
- name: Assemble Final Site
43+
run: |
44+
# Create a temporary folder for the final website
45+
mkdir _final_build
46+
47+
# A. Copy your EXISTING main site (from root docs/) to the root of the build
48+
cp -r site/* _final_build/
49+
50+
# B. Create the subfolder for documentation
51+
mkdir -p _final_build/documentation
52+
53+
# C. Copy the docmd output into that subfolder
54+
cp -r docmd/site/* _final_build/documentation/
55+
56+
# --- 3. Deploy ---
57+
- name: Setup Pages
58+
uses: actions/configure-pages@v5
59+
60+
- name: Upload artifact
61+
uses: actions/upload-pages-artifact@v3
62+
with:
63+
path: ./_final_build # Upload the merged folder
64+
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)