Skip to content

Commit 9bd2f62

Browse files
authored
Add instructions about building docs locally (#289)
2 parents 9776f5f + 3d01f31 commit 9bd2f62

File tree

4 files changed

+45
-13
lines changed

4 files changed

+45
-13
lines changed

.github/workflows/documentation.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,16 @@ jobs:
4040
runs-on: ubuntu-latest
4141
if: ${{ !github.event.pull_request.draft }}
4242
steps:
43-
- name: Checkout
44-
uses: actions/checkout@v4
45-
- name: Setup Julia
46-
uses: julia-actions/setup-julia@v2
47-
- name: Pull Julia cache
48-
uses: julia-actions/cache@v2
49-
- name: Install documentation dependencies
50-
run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate(); Pkg.precompile(); Pkg.status()'
51-
#- name: Creating new mds from src
52-
- name: Build and deploy docs
53-
uses: julia-actions/julia-docdeploy@v1
43+
- uses: actions/checkout@v4
44+
- uses: julia-actions/setup-julia@v2
45+
with:
46+
version: '1'
47+
- uses: julia-actions/cache@v2
48+
- uses: julia-actions/julia-buildpkg@v1
49+
- uses: julia-actions/julia-docdeploy@v1
5450
env:
5551
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
5652
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
57-
GKSwstype: "100" # for Plots.jl plots (if you have them)
5853
JULIA_DEBUG: "Documenter"
5954
DATADEPS_ALWAYS_ACCEPT: true
55+
# GKSwstype: "100" # for Plots.jl plots (if you have them)

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
Manifest.toml
77

88
.vscode
9-
*.json
9+
10+
benchmarks/benchmarks_output.json
1011

1112
.ipynb_checkpoints
1213
*.ipynb

docs/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,23 @@ Run the following command:
2525
```shell
2626
julia --project=docs docs/make.jl
2727
```
28+
29+
# How to start a local Vitepress site ?
30+
31+
> [!NOTE]
32+
> You need to install `Node.js` and `npm` first.
33+
34+
Enter `docs` directory first:
35+
```shell
36+
cd /path/to/QuantumToolbox.jl/docs
37+
```
38+
39+
Install `npm` dependencies:
40+
```shell
41+
npm i
42+
```
43+
44+
Run the following command:
45+
```shell
46+
npm run docs:dev
47+
```

docs/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"scripts": {
3+
"docs:dev": "vitepress dev build/.documenter",
4+
"docs:build": "vitepress build build/.documenter",
5+
"docs:preview": "vitepress preview build/.documenter"
6+
},
7+
"dependencies": {
8+
"@shikijs/transformers": "^1.1.7",
9+
"markdown-it": "^14.1.0",
10+
"markdown-it-footnote": "^4.0.0",
11+
"markdown-it-mathjax3": "^4.3.2",
12+
"vitepress": "^1.1.4",
13+
"vitepress-plugin-tabs": "^0.5.0"
14+
}
15+
}

0 commit comments

Comments
 (0)