diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 87d82251a..3bc705b0e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -40,20 +40,16 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Julia - uses: julia-actions/setup-julia@v2 - - name: Pull Julia cache - uses: julia-actions/cache@v2 - - name: Install documentation dependencies - run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate(); Pkg.precompile(); Pkg.status()' - #- name: Creating new mds from src - - name: Build and deploy docs - uses: julia-actions/julia-docdeploy@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - GKSwstype: "100" # for Plots.jl plots (if you have them) JULIA_DEBUG: "Documenter" DATADEPS_ALWAYS_ACCEPT: true + # GKSwstype: "100" # for Plots.jl plots (if you have them) diff --git a/.gitignore b/.gitignore index 900000a03..b07886a94 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,8 @@ Manifest.toml .vscode -*.json + +benchmarks/benchmarks_output.json .ipynb_checkpoints *.ipynb \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 9fe1e761c..59b6db243 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,3 +25,23 @@ Run the following command: ```shell julia --project=docs docs/make.jl ``` + +# How to start a local Vitepress site ? + +> [!NOTE] +> You need to install `Node.js` and `npm` first. + +Enter `docs` directory first: +```shell +cd /path/to/QuantumToolbox.jl/docs +``` + +Install `npm` dependencies: +```shell +npm i +``` + +Run the following command: +```shell +npm run docs:dev +``` \ No newline at end of file diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..5633b4976 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,15 @@ +{ + "scripts": { + "docs:dev": "vitepress dev build/.documenter", + "docs:build": "vitepress build build/.documenter", + "docs:preview": "vitepress preview build/.documenter" + }, + "dependencies": { + "@shikijs/transformers": "^1.1.7", + "markdown-it": "^14.1.0", + "markdown-it-footnote": "^4.0.0", + "markdown-it-mathjax3": "^4.3.2", + "vitepress": "^1.1.4", + "vitepress-plugin-tabs": "^0.5.0" + } +}