Skip to content

Commit

Permalink
build(docs): add doc deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Aug 5, 2024
1 parent ee4cd4f commit f8d2796
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Documentation

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

jobs:
build:
permissions:
contents: write
pull-requests: read
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v2
with:
version: '1.6'

- uses: julia-actions/cache@v1

- 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 }}
run: julia --project=docs/ docs/make.jl deploy
8 changes: 8 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ makedocs(
"Reference" => "reference.md",
],
)

if "deploy" in ARGS
deploydocs(
repo = "github.com/AnzhiZhang/TypedMatrices.jl.git",
)
else
@info "Skipping deployment ('deploy' not passed)"
end

0 comments on commit f8d2796

Please sign in to comment.