Skip to content

Commit

Permalink
fix documentation build (#37)
Browse files Browse the repository at this point in the history
* fix docs

* fix doc

* ignore generated css
  • Loading branch information
Roger-luo committed Sep 18, 2021
1 parent c71c3d6 commit f178e8d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Documentation

on:
push:
branches:
- master
tags: '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs/ docs/make.jl
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.DS_Store
/Manifest.toml
test/Manifest.toml
docs/Manifest.toml
*.jl.cov
*.jl.*.cov
*.jl.mem

docs/build
.vscode
docs/src/assets/indigo.css
.vscode
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[deps]
BitBasis = "50ba71b6-fa0f-514d-ae9a-0916efc90dcf"
DocThemeIndigo = "8bac0ac5-51bf-41f9-885e-2bf1ac2bec5f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
24 changes: 16 additions & 8 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
using Documenter, BitBasis
import BitBasis

const PAGES = ["Home" => "index.md", "Tutorial" => "tutorial.md", "Manual" => "man.md"]
using BitBasis
using Documenter
using DocThemeIndigo

indigo = DocThemeIndigo.install(BitBasis)

makedocs(
modules = [BitBasis],
repo="https://github.com/QuantumBFS/BitBasis.jl/blob/{commit}{path}#{line}",
format = Documenter.HTML(
prettyurls = ("deploy" in ARGS),
canonical = ("deploy" in ARGS) ? "https://quantumbfs.github.io/BitBasis.jl/latest/" : nothing,
canonical = "https://quantumbfs.github.io/BitBasis.jl/dev/",
assets = String[indigo, "assets/favicon.ico"],
),
assets = ["assets/favicon.ico"],
clean = false,
sitename = "BitBasis.jl",
linkcheck = !("skiplinks" in ARGS),
pages = PAGES,
pages = [
"Home" => "index.md",
"Tutorial" => "tutorial.md",
"Manual" => "man.md",
],
)

deploydocs(repo = "github.com/QuantumBFS/BitBasis.jl.git", target = "build")
deploydocs(
repo = "github.com/QuantumBFS/BitBasis.jl.git",
)

0 comments on commit f178e8d

Please sign in to comment.