Skip to content

Commit 5cff9fd

Browse files
Documentation and Turing Navigation CI improvement (#115)
* Update Docs.yml * Create DocsNav.yml * Update Docs.yml * Update DocsNav.yml
1 parent 310c50d commit 5cff9fd

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

.github/workflows/Docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
- main
77
tags: '*'
88
pull_request:
9-
branches:
10-
- main
119

1210
concurrency:
1311
# Skip intermediate builds: always.
@@ -25,4 +23,4 @@ jobs:
2523

2624
steps:
2725
- name: Build and deploy Documenter.jl docs
28-
uses: TuringLang/DocsNav/DocsDocumenter@v2
26+
uses: TuringLang/actions/DocsDocumenter@main

.github/workflows/DocsNav.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 config user.name github-actions[bot]
33+
git config user.email github-actions[bot]@users.noreply.github.com
34+
git add -A
35+
git commit -m "Update navbar (automated)"
36+
git push
37+
else
38+
echo "No changes to commit"
39+
fi

0 commit comments

Comments
 (0)