Skip to content

Commit 5b1b3e2

Browse files
committed
refactor: remove openmlsys-en here.
1 parent 493e8e1 commit 5b1b3e2

File tree

558 files changed

+5003
-54603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

558 files changed

+5003
-54603
lines changed

.github/workflows/.main.yml.test

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: D2l Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
- workflow_dispatch # Allows you to run this workflow manually from the Actions tab
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python 3.8
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.8'
20+
21+
- name: Cache Python packages
22+
uses: actions/cache@v3
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m venv venv
32+
source venv/bin/activate
33+
pip install --upgrade pip
34+
pip install -r requirements.txt
35+
cd ..
36+
git clone https://github.com/openmlsys/d2l-book.git
37+
cd d2l-book
38+
pip install .
39+
40+
- name: Install pandoc
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y pandoc
44+
45+
- name: Build HTML documentation
46+
run: |
47+
source venv/bin/activate
48+
d2lbook build html

.github/workflows/update_docs.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Update Docs
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
env:
9+
PYTHON_VERSION: '3.8'
10+
GIT_USER_NAME: 'GitHub Actions Bot'
11+
GIT_USER_EMAIL: 'github-actions[bot]@users.noreply.github.com'
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-20.04
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v3 # Updated to v3
20+
with:
21+
fetch-depth: 0 # Fetch all history for better versioning
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ env.PYTHON_VERSION }}
27+
cache: 'pip' # Enable pip caching
28+
29+
- name: Install system dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y pandoc
33+
34+
- name: Setup Python virtual environment
35+
run: |
36+
python -m venv venv
37+
source venv/bin/activate
38+
pip install --upgrade pip
39+
40+
- name: Install Python dependencies
41+
run: |
42+
source venv/bin/activate
43+
pip install -r requirements.txt
44+
pip install sphinx-mathjax-offline
45+
46+
- name: Install d2l-book
47+
run: |
48+
source venv/bin/activate
49+
git clone https://github.com/openmlsys/d2l-book.git
50+
cd d2l-book
51+
pip install .
52+
cd ..
53+
54+
- name: Build documentation
55+
run: |
56+
source venv/bin/activate
57+
sh build_html.sh
58+
- name: Deploy to pages branch
59+
run: |
60+
# Create and switch to a new worktree for the pages branch
61+
git worktree add --detach pages
62+
cd pages
63+
64+
# Delete pages branch if it exists and create a new orphan branch
65+
git fetch origin pages || true
66+
git branch -D pages || true
67+
git checkout --orphan pages
68+
git rm -rf . || true
69+
70+
# Copy built documentation
71+
cp -r ../_build/html/* .
72+
73+
# Configure git
74+
git config user.name "${GIT_USER_NAME}"
75+
git config user.email "${GIT_USER_EMAIL}"
76+
77+
# Add and commit all changes
78+
git add .
79+
git commit -m "docs: update documentation
80+
81+
Automated update by GitHub Actions
82+
Workflow: ${{ github.workflow }}
83+
Run ID: ${{ github.run_id }}
84+
Triggered by: ${{ github.event_name }}"
85+
86+
# Force push to pages branch
87+
git push -f origin pages
88+
89+
# Clean up the worktree
90+
cd ..
91+
git worktree remove pages
92+
93+
- name: Clean up
94+
if: always()
95+
run: |
96+
rm -rf venv
97+
rm -rf d2l-book

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# openmlsys-en
2+
《Machine Learning Systems: Design and Implementation》- English Version

_sources/chapter_preface/index.rst.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

_sources/index.rst.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

_sources/static/readme.rst.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

_static/_sphinx_javascript_frameworks_compat.js

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)