Skip to content

Commit 1182165

Browse files
committed
Add GitHub Actions docs deployment (Pages artifact, no deploy key needed)
1 parent bee5e51 commit 1182165

2 files changed

Lines changed: 75 additions & 4 deletions

File tree

.github/workflows/docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
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: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Julia
25+
uses: julia-actions/setup-julia@v2
26+
with:
27+
version: '1.12'
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: '22'
33+
34+
- name: Install Julia dependencies
35+
run: |
36+
julia --project=docs -e '
37+
using Pkg
38+
Pkg.develop(PackageSpec(path="."))
39+
Pkg.instantiate()
40+
'
41+
42+
- name: Build playground CodeMirror bundle
43+
run: |
44+
if [ -f playground/cm-bundle/package.json ]; then
45+
cd playground/cm-bundle
46+
npm ci
47+
npx esbuild entry-global.js --bundle --format=iife --outfile=cm-julia.js --minify
48+
fi
49+
50+
- name: Build docs
51+
env:
52+
CI: "true"
53+
run: |
54+
julia --project=docs docs/make.jl
55+
56+
- name: Setup Pages
57+
uses: actions/configure-pages@v4
58+
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: docs/build
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4

docs/make.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ makedocs(;
2424
),
2525
)
2626

27-
deploydocs(;
28-
repo="github.com/GroupTherapyOrg/JavaScriptTarget.jl.git",
29-
devbranch="main",
30-
)
27+
# Deployment handled by GitHub Actions (actions/deploy-pages)
28+
# No deploydocs() needed — workflow uploads docs/build/ directly

0 commit comments

Comments
 (0)