diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 3ff0ba0..4b1c8c0 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,27 +1,51 @@ -# https://documenter.juliadocs.org/stable/man/hosting/#GitHub-Actions -name: Documentation +# Sample workflow for building and deploying a VitePress site to GitHub Pages +# +name: Deploy documentation on: + # Runs on pushes targeting the `main` branch. Change this to `master` if you're + # using the `master` branch as the default branch. push: branches: - - main - tags: '*' + - main + tags: ['*'] pull_request: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: write + pages: write + id-token: write + actions: write + + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: pages + cancel-in-progress: false + jobs: + # Build job build: - permissions: - contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1.6' - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy + - name: Checkout + uses: actions/checkout@v4 + with: # Fetches the last commit only + fetch-depth: 0 + - name: Setup Julia + uses: julia-actions/setup-julia@v1 + - name: Pull Julia cache + uses: julia-actions/cache@v1 + - name: Generate logo + - uses: julia-actions/julia-docdeploy@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key - run: julia --project=docs/ docs/make.jl + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key + GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 + JULIA_DEBUG: "Documenter" + DATADEPS_ALWAYS_ACCEPT: true diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..d45cf53 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,16 @@ +{ + "scripts": { + "docs:dev": "vitepress dev build/.documenter", + "docs:build": "vitepress build build/.documenter", + "docs:preview": "vitepress preview build/.documenter" + }, + "dependencies": { + "@nolebase/vitepress-plugin-enhanced-readabilities": "^2.12.1", + "@shikijs/transformers": "^2.0.3", + "markdown-it": "^14.1.0", + "markdown-it-footnote": "^4.0.0", + "markdown-it-mathjax3": "^4.3.2", + "vitepress": "^1.6.3", + "vitepress-plugin-tabs": "^0.5.0" + } +} diff --git a/docs/src/index.md b/docs/src/index.md index 3685e54..15e6504 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,3 +1,4 @@ +```@raw html --- # https://vitepress.dev/reference/default-theme-home-page # Cribbed from DimensionalData.jl @@ -30,5 +31,4 @@ features: details: Visualize sequences and 3D proteins with ease link: https://biojulia.dev/BioMakie.jl --- - - +```