Skip to content

Commit

Permalink
add CI job to build and deploy documentation (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonEhrig authored Sep 27, 2023
1 parent 7dbdd8b commit 36ec264
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/BuildDelopyDoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Deploy Documentation

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

jobs:
build:
permissions:
contents: write
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- name: Add custom registry
run: |
julia --project=docs/ -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/QEDjl-project/registry.git"));'
julia --project=docs/ -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/JuliaRegistries/General"));'
- 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 }} # If authenticating with GitHub Actions token
run: julia --project=docs/ docs/make.jl
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# QEDevents

[![Doc Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://qedjl-project.github.io/QEDevents.jl/main)
[![Doc Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://qedjl-project.github.io/QEDevents.jl/dev)
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)


Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DocMeta.setdocmeta!(QEDevents, :DocTestSetup, :(using QEDevents); recursive = tr
makedocs(;
modules = [QEDevents],
authors = "Uwe Hernandez Acosta <[email protected]>, Simeon Ehrig, Klaus Steiniger, Tom Jungnickel, Anton Reinhard",
repo = "https://github.com/QEDjl-project/QEDevents.jl/blob/{commit}{path}#{line}",
repo = Documenter.Remotes.GitHub("QEDjl-project", "QEDevents.jl"),
sitename = "QEDevents.jl",
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
Expand All @@ -15,3 +15,4 @@ makedocs(;
),
pages = ["Home" => "index.md"],
)
deploydocs(repo = "github.com/QEDjl-project/QEDevents.jl.git", push_preview = false)

0 comments on commit 36ec264

Please sign in to comment.