Skip to content

Commit 3a38603

Browse files
Documentation and Turing Navigation CI improvement (#110)
* Update and rename documentation.yml to Docs.yml * Create DocsNav.yml * No need of deploydocs() after using new Docs & DocsNav workflows * branch name fix
1 parent 08d7cb2 commit 3a38603

File tree

4 files changed

+65
-35
lines changed

4 files changed

+65
-35
lines changed

.github/workflows/Docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
merge_group:
10+
types: [checks_requested]
11+
12+
concurrency:
13+
# Skip intermediate builds: always.
14+
# Cancel intermediate builds: only if it is a pull request build.
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
22+
jobs:
23+
docs:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Build and deploy Documenter.jl docs
28+
uses: TuringLang/actions/DocsDocumenter@main

.github/workflows/DocsNav.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Rebuild docs with newest navbar
2+
3+
on:
4+
# 3:25 AM UTC every Sunday -- choose an uncommon time to avoid
5+
# periods of heavy GitHub Actions usage
6+
schedule:
7+
- cron: '25 3 * * 0'
8+
# Whenever needed
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
update-navbar:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout gh-pages branch
20+
uses: actions/checkout@v4
21+
with:
22+
ref: gh-pages
23+
24+
- name: Insert navbar
25+
uses: TuringLang/actions/DocsNav@main
26+
with:
27+
doc-path: '.'
28+
29+
- name: Commit and push changes
30+
run: |
31+
if [[ -n $(git status -s) ]]; then
32+
git add -A
33+
git commit -m "Update navbar (automated)"
34+
git push
35+
else
36+
echo "No changes to commit"
37+
fi

.github/workflows/documentation.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/make.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,3 @@ using AdvancedMH
66
# cp(joinpath(@__DIR__, "../README.md"), joinpath(@__DIR__, "src/index.md"))
77

88
makedocs(sitename = "AdvancedMH", format = Documenter.HTML(), modules = [AdvancedMH], checkdocs = :exports)
9-
10-
deploydocs(
11-
repo = "github.com/TuringLang/AdvancedMH.jl.git",
12-
push_preview = true, # allow PR to deploy
13-
)

0 commit comments

Comments
 (0)