Refactor code structure for improved readability and maintainability
Some checks failed
/ serve (push) Failing after 47s
Some checks failed
/ serve (push) Failing after 47s
This commit is contained in:
parent
7ea0ad923c
commit
71b8630862
7 changed files with 1378 additions and 25 deletions
|
@ -4,29 +4,20 @@ on:
|
|||
- "main"
|
||||
jobs:
|
||||
serve:
|
||||
runs-on: self-hosted
|
||||
runs-on: uv
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "true"
|
||||
- name: Initialize virtual environment
|
||||
run: /usr/bin/python -m venv .venv
|
||||
- name: Install dependencies
|
||||
run: ./.venv/bin/pip install -r requirements.txt
|
||||
- name: Execute code
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
myst build --execute
|
||||
run: uv run myst build --execute
|
||||
- name: Build PDF exports
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
myst build --execute --pdf
|
||||
run: uv run myst build --execute --pdf
|
||||
- name: Build static HTML
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
myst build --execute --html
|
||||
run: uv run myst build --execute --html
|
||||
- name: Copy files
|
||||
run: |
|
||||
rm -rf /data/srv/forgejo-runner/cours4.0
|
||||
cp -r _build/html /data/srv/forgejo-runner/cours4.0
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: srv
|
||||
path: _build/html
|
1
.python-version
Normal file
1
.python-version
Normal file
|
@ -0,0 +1 @@
|
|||
3.13
|
|
@ -3,4 +3,4 @@
|
|||
<https://cours.edgarpierre.fr>
|
||||
|
||||
[](https://myst.tools)
|
||||
[](https://git.edgarpierre.fr/edpibu/cours4.0/actions?workflow=serve.yaml)
|
||||
[](https://code.edgarpierre.fr/edpibu/cours4.0/actions?workflow=serve.yaml)
|
6
main.py
Normal file
6
main.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
def main():
|
||||
print("Hello from cours4-0!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
15
pyproject.toml
Normal file
15
pyproject.toml
Normal file
|
@ -0,0 +1,15 @@
|
|||
[project]
|
||||
name = "cours4-0"
|
||||
version = "0.1.0"
|
||||
description = "Cours 4.0"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
"mystmd",
|
||||
"jupyter-server",
|
||||
"ipykernel",
|
||||
"matplotlib",
|
||||
"numpy",
|
||||
"pandas",
|
||||
"scipy",
|
||||
]
|
|
@ -1,7 +0,0 @@
|
|||
mystmd
|
||||
jupyter-server
|
||||
ipykernel
|
||||
matplotlib
|
||||
numpy
|
||||
pandas
|
||||
scipy
|
Loading…
Add table
Add a link
Reference in a new issue