Skip to content

Commit 5328534

Browse files
authored
Add docs workflow to 0.2 branch too (#107)
1 parent 5cd075b commit 5328534

File tree

4 files changed

+80
-2
lines changed

4 files changed

+80
-2
lines changed

.github/workflows/Docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
tags: '*'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
statuses: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: julia-actions/setup-julia@v1
16+
with:
17+
version: '1'
18+
- name: Configure doc environment
19+
shell: julia --project=docs --color=yes {0}
20+
run: |
21+
using Pkg
22+
Pkg.develop(PackageSpec(path=pwd()))
23+
Pkg.instantiate()
24+
- uses: julia-actions/julia-buildpkg@v1
25+
- name: Build and deploy
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
29+
run: julia --project=docs/ docs/make.jl

.github/workflows/DocsNav.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Add Navbar
2+
3+
on:
4+
page_build: # Triggers the workflow on push events to gh-pages branch
5+
workflow_dispatch: # Allows manual triggering
6+
schedule:
7+
- cron: '0 0 * * 0' # Runs every week on Sunday at midnight (UTC)
8+
9+
jobs:
10+
add-navbar:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout gh-pages
16+
uses: actions/checkout@v4
17+
with:
18+
ref: gh-pages
19+
fetch-depth: 0
20+
21+
- name: Download insert_navbar.sh
22+
run: |
23+
curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/main/assets/scripts/insert_navbar.sh
24+
chmod +x insert_navbar.sh
25+
26+
- name: Update Navbar
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
git config user.name github-actions[bot]
31+
git config user.email github-actions[bot]@users.noreply.github.com
32+
33+
# Define the URL of the navbar to be used
34+
NAVBAR_URL="https://raw.githubusercontent.com/TuringLang/turinglang.github.io/main/assets/scripts/TuringNavbar.html"
35+
36+
# Update all HTML files in the current directory (gh-pages root)
37+
./insert_navbar.sh . $NAVBAR_URL
38+
39+
# Remove the insert_navbar.sh file
40+
rm insert_navbar.sh
41+
42+
# Check if there are any changes
43+
if [[ -n $(git status -s) ]]; then
44+
git add .
45+
git commit -m "Added navbar and removed insert_navbar.sh"
46+
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" gh-pages
47+
else
48+
echo "No changes to commit"
49+
fi

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
- uses: JuliaRegistries/TagBot@v1
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
15-
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "AdvancedVI"
22
uuid = "b5ca4192-6429-45e5-a2d9-87aec30a685c"
3-
version = "0.2.7"
3+
version = "0.2.8"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

0 commit comments

Comments
 (0)