Skip to content

Commit

Permalink
Merge pull request #368 from JuliaDataCubes/vite_docs
Browse files Browse the repository at this point in the history
revamp docs again :D
  • Loading branch information
lazarusA authored Feb 19, 2024
2 parents 134d5c0 + 5e392bb commit 4f67fae
Show file tree
Hide file tree
Showing 50 changed files with 4,883 additions and 1,239 deletions.
62 changes: 43 additions & 19 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,64 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Documenter

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:
- master
tags: '*'
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
statuses: 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:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
permissions:
contents: write
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
DISPLAY: ':0'
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/cache@v1
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
cache-registries: "true"
- name: Install documentation dependencies
node-version: 20
cache: npm # or pnpm / yarn
cache-dependency-path: 'docs/package-lock.json' # this should be a package-lock.json file
- name: Setup Julia
uses: julia-actions/setup-julia@v1
- name: Pull Julia cache
uses: julia-actions/cache@v1
- name: Install documentation dependencies # for GLMakie plots
run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- name: Install pkgs dependencies
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.precompile(); pkg"dev ."; pkg"add DiskArrayTools#master"'
- name: Build and deploy
- name: Install documentation dependencies
run: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs -e 'using Pkg; pkg"add https://github.com/LuxDL/DocumenterVitepress.jl.git"; pkg"dev ."; pkg"add DimensionalData#main"; Pkg.instantiate(); Pkg.precompile(); Pkg.status()'
- name: Instantiate NPM
run: cd docs/; npm i; cd ..
#- name: Creating new mds from src
- name: Build and deploy docs
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" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988
GKSwstype: "100" # for Plots.jl plots (if you have them)
JULIA_DEBUG: "Documenter"
DATADEPS_ALWAYS_ACCEPT: true
run: |
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --code-coverage=user --project=docs/ --color=yes docs/genfiles.jl
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --code-coverage=user --project=docs/ --color=yes docs/make.jl
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ --color=yes docs/make.jl
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ bonito
/benchmark/*.json
.benchmarkci
coverage/lcov.info
node_modules
docs/node_modules

.DS_Store
docs/src/.vitepress/cache
docs/src/.vitepress/dist
docs/Manifest.toml
docs/.vscode
docs/node_modules
docs/.vitepress/cache
docs/.vitepress/dist
docs/.DS_Store
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CFTime = "0.0, 0.1"
DataStructures = "0.17, 0.18"
DimensionalData = "0.24, 0.25"
DiskArrayTools = "0.1"
DiskArrays = "0.3"
DiskArrays = "0.3,0.4"
DocStringExtensions = "0.8, 0.9"
Glob = "1.3"
Interpolations = "0.12, 0.13, 0.14, 0.15"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
DiskArrayTools = "fcd2136c-9f69-4db6-97e5-f31981721d63"
DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
Expand Down
30 changes: 0 additions & 30 deletions docs/_overrides/partials/source.html

This file was deleted.

171 changes: 0 additions & 171 deletions docs/examples/HowdoI/howdoi.jl

This file was deleted.

30 changes: 0 additions & 30 deletions docs/examples/HowdoI/switchtodimarray.jl

This file was deleted.

Loading

0 comments on commit 4f67fae

Please sign in to comment.