Skip to content

Commit 9b66c56

Browse files
author
Obada Haddad
committed
rebase; add mike for versioning; change workflows to include mike
1 parent b1a4b45 commit 9b66c56

5 files changed

Lines changed: 176 additions & 45 deletions

File tree

.github/workflows/ghPages-dev.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: github-pages-dev
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy-dev:
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: documentation/
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Configure Git Credentials
17+
run: |
18+
git config user.name github-actions[bot]
19+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.x
23+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
24+
- run: /home/runner/.local/bin/uv sync
25+
- run: git fetch origin gh-pages --depth=1 && PDF=1 /home/runner/.local/bin/uv run mike deploy -u dev --push

.github/workflows/ghPages-prod.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
1-
name: Documentation
1+
name: github-pages-prod
22
on:
33
push:
4-
branches:
5-
- master
6-
- main
4+
tags:
5+
- '*'
76
permissions:
8-
contents: read
9-
pages: write
10-
id-token: write
7+
contents: write
118
jobs:
12-
deploy:
13-
environment:
14-
name: github-pages
15-
url: ${{ steps.deployment.outputs.page_url }}
9+
deploy-prod:
1610
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: documentation/
1714
steps:
18-
- uses: actions/configure-pages@v5
19-
- uses: actions/checkout@v5
15+
- uses: actions/checkout@v4
16+
- name: Configure Git Credentials
17+
run: |
18+
git config user.name github-actions[bot]
19+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
2020
- uses: actions/setup-python@v5
2121
with:
2222
python-version: 3.x
23-
- run: pip install zensical
24-
- run: zensical build --clean
25-
- uses: actions/upload-pages-artifact@v4
26-
with:
27-
path: site
28-
- uses: actions/deploy-pages@v4
29-
id: deployment
23+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
24+
- run: /home/runner/.local/bin/uv sync
25+
- run: git fetch origin gh-pages --depth=1 && PDF=1 /home/runner/.local/bin/uv run mike deploy -u ${{ github.ref_name }} latest --push

documentation/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.14"
77
dependencies = [
8+
"mike",
89
"zensical>=0.0.24",
910
]
11+
12+
[tool.uv.sources]
13+
mike = { git = "https://github.com/squidfunk/mike.git" }

0 commit comments

Comments
 (0)