Skip to content

Commit 5229273

Browse files
committed
feat: enhance wiki publishing workflow and add site deployment configuration
1 parent e4c20e2 commit 5229273

3 files changed

Lines changed: 71 additions & 5 deletions

File tree

.github/workflows/wiki.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
name: Publish Wiki
1+
name: Publish Wiki & Deploy Site
22

33
on:
44
push:
55
branches:
66
- main
77
paths:
88
- 'book/**'
9-
workflow_dispatch: # Allow manual trigger
9+
- 'website/**'
10+
workflow_dispatch:
1011

1112
permissions:
1213
contents: write
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: true
1320

1421
jobs:
1522
publish-wiki:
@@ -64,3 +71,40 @@ jobs:
6471
with:
6572
path: wiki/
6673
token: ${{ secrets.GITHUB_TOKEN }}
74+
75+
deploy-site:
76+
runs-on: ubuntu-latest
77+
environment:
78+
name: github-pages
79+
url: ${{ steps.deployment.outputs.page_url }}
80+
steps:
81+
- name: Checkout repository
82+
uses: actions/checkout@v4
83+
84+
- name: Install Markflow
85+
run: |
86+
curl -sL https://raw.githubusercontent.com/darmie/markflow/main/install.sh | bash
87+
echo "$HOME/.markflow" >> $GITHUB_PATH
88+
89+
- name: Build site
90+
run: |
91+
mkdir -p site
92+
93+
# Copy website landing page to site root
94+
cp website/index.html site/index.html
95+
96+
# Build book docs with Markflow into /book subdirectory
97+
markflow build --prebake --source ./book \
98+
--output ./site/book --config ./book/.env
99+
100+
- name: Configure Pages
101+
uses: actions/configure-pages@v5
102+
103+
- name: Upload Pages artifact
104+
uses: actions/upload-pages-artifact@v3
105+
with:
106+
path: ./site
107+
108+
- name: Deploy to GitHub Pages
109+
id: deployment
110+
uses: actions/deploy-pages@v4

book/.env

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MARKFLOW_REPO_OWNER=darmie
2+
MARKFLOW_REPO_NAME=zyntax
3+
MARKFLOW_REPO_BRANCH=main
4+
MARKFLOW_REPO_ROOT=book
5+
6+
MARKFLOW_BRAND_NAME=Zyntax
7+
MARKFLOW_DESCRIPTION=A high-performance, multi-paradigm compiler infrastructure with advanced type system features, tiered JIT compilation, and async/await runtime support.
8+
MARKFLOW_URL=https://darmie.github.io/zyntax
9+
10+
MARKFLOW_ACCENT=#1a1a1a
11+
MARKFLOW_BG_PRIMARY=#eaeaf2
12+
MARKFLOW_BG_SECONDARY=#f5f5fa
13+
MARKFLOW_BG_TERTIARY=#ffffff
14+
MARKFLOW_TEXT_PRIMARY=#111118
15+
MARKFLOW_TEXT_SECONDARY=#555566
16+
MARKFLOW_TEXT_MUTED=#888899
17+
MARKFLOW_BORDER=rgba(0,0,0,0.08)
18+
MARKFLOW_CODE_BG=#1a1a2e
19+
20+
MARKFLOW_SOCIAL_GITHUB=https://github.com/darmie/zyntax
21+
22+
MARKFLOW_LLM_FRIENDLY=true
23+
MARKFLOW_BRANCH_SWITCHER=false

website/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,7 @@
396396
<a href="#" class="nav-logo">Zyntax</a>
397397

398398
<ul class="nav-links">
399-
<li><a href="#">Docs</a></li>
400-
<li><a href="#">The Zyn Book</a></li>
399+
<li><a href="/book">The Zyn Book</a></li>
401400
<li><a href="#" class="nav-link-badge">Playground <span class="coming-soon">Soon</span></a></li>
402401
<li>
403402
<a href="https://github.com/darmie/zyntax" class="nav-cta" target="_blank" rel="noopener">
@@ -432,7 +431,7 @@ <h1 class="hero-title">
432431
</p>
433432

434433
<div class="hero-actions">
435-
<a href="#" class="btn btn-primary">
434+
<a href="/book" class="btn btn-primary">
436435
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
437436
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/>
438437
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/>

0 commit comments

Comments
 (0)