Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master, main]
repository_dispatch:
types: [docs-updated]
types: [docs-updated, version-released]
workflow_dispatch:

permissions:
Expand All @@ -28,14 +28,7 @@ jobs:
node-version: 20
cache: npm

# ── Build website ──
- name: Install website dependencies
run: npm ci

- name: Build website
run: npm run build

# ── Build docs (from opencli repo) ──
# ── Checkout opencli repo (needed for version + docs) ──
- name: Checkout opencli repo
uses: actions/checkout@v4
with:
Expand All @@ -46,6 +39,22 @@ jobs:
package.json
package-lock.json

- name: Extract opencli version
id: version
run: |
VERSION=$(node -p "require('./_opencli/package.json').version")
echo "OPENCLI_VERSION=$VERSION" >> "$GITHUB_OUTPUT"

# ── Build website ──
- name: Install website dependencies
run: npm ci

- name: Build website
run: npm run build
env:
VITE_OPENCLI_VERSION: ${{ steps.version.outputs.OPENCLI_VERSION }}

# ── Build docs ──
- name: Install docs dependencies
working-directory: _opencli
run: npm ci
Expand All @@ -65,6 +74,7 @@ jobs:
with:
path: ./dist


deploy:
environment:
name: github-pages
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function Hero() {
<div className="hero-content">
<div className="hero-badge">
<span className="hero-badge-dot" />
v1.0 — Now with Desktop App Support
v{import.meta.env.VITE_OPENCLI_VERSION || '1.0'} — Now with Desktop App Support
</div>
<h1>
Make Any Website
Expand Down