Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/ghPages-dev.yml

This file was deleted.

36 changes: 20 additions & 16 deletions .github/workflows/ghPages-prod.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
name: github-pages-prod
name: Documentation
on:
push:
tags:
- '*'
branches:
- master
- main
permissions:
contents: write
contents: read
pages: write
id-token: write
jobs:
deploy-prod:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: documentation/
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/configure-pages@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: /home/runner/.local/bin/uv sync
- run: git fetch origin gh-pages --depth=1 && PDF=1 /home/runner/.local/bin/uv run mike deploy -u ${{ github.ref_name }} latest --push
- run: pip install zensical
- run: zensical build --clean
- uses: actions/upload-pages-artifact@v4
with:
path: site
- uses: actions/deploy-pages@v4
id: deployment
2 changes: 1 addition & 1 deletion documentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ wheels/
# Virtual environments
.venv

uv.lock

site/*
.python-version
1 change: 0 additions & 1 deletion documentation/.python-version

This file was deleted.

20 changes: 3 additions & 17 deletions documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,12 @@ To build the docs locally, you will have to first install [uv](https://github.co
Once that is done, you can run the following commands (while inside this folder):

```bash
uv sync # You only need to run this once, it will download all the necessary python packages
PDF=1 uv run mkdocs serve -a localhost:8888 # This will build the site and serve it on localhost:8888
uv sync --frozen # You only need to run this once, it will download all the necessary python packages
uv run zensical serve -a localhost:8888 # This will build the site and serve it on localhost:8888
```

Open [localhost:8888](http://localhost:8888/) in your browser and you will see the docs. Every changes you make will rebuild the documentation.
You can remove the `PDF=1` environement variable if you want to speed up the build process, but you will not generate the related PDF.


### Versioning
We use the [mike](https://github.com/jimporter/mike) plugin to preserve multiple version of the docs.

To use it, you can run the following command:
```bash
PDF=1 uv run mike deploy -u dev # This will create the site and push the changes in the gh-pages branch
uv run mike serve -a localhost:8888 # Serve the site on localhost:8888
```
Check the official Github page of the plugin for more information on how it works.

## Images and Assets
Images and assets are saved in the `_attachments` folder closest to the documentation file that calls for the image. If an image is used in multiple different places, then it should be put in `_attachements` folder in the `docs/` root directory.

## Github workflow
We have Github workflows set up to automatically rebuild the docs when the `develop` branch receives changes, and when a new tag is created for the `master` branch.
Images and assets are saved in the `_attachments` folder closest to the documentation file that calls for the image. If an image is used in multiple different places, then it should be put in `_attachements` folder in the `docs/` root directory.
6 changes: 0 additions & 6 deletions documentation/main.py

This file was deleted.

176 changes: 0 additions & 176 deletions documentation/mkdocs.yml

This file was deleted.

4 changes: 2 additions & 2 deletions documentation/overrides/partials/copyright.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% endif %}
{% if not config.extra.generator == false %}
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
<a href="https://zensical.org/" target="_blank" rel="noopener">
Zensical
</a>
{% endif %}
</div>
10 changes: 3 additions & 7 deletions documentation/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[project]
name = "codabench-mkdocs"
name = "documentation"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
requires-python = ">=3.14"
dependencies = [
"mike>=2.1.3",
"mkdocs-glightbox>=0.4.0",
"mkdocs-material>=9.6.15",
"mkdocs-open-in-new-tab>=1.0.8",
"mkdocs-to-pdf>=0.10.1",
"zensical>=0.0.24",
]
Loading