Skip to content

Commit f1329e4

Browse files

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

.github/workflows/deploy-book.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# In .github/workflows/deploy-book.yml
2+
name: Deploy Jupyter Book
3+
4+
# Controls when the action will run
5+
on:
6+
# Run on pushes to your default branch (main or master)
7+
push:
8+
branches: ["main"] # Change to "master" if that's your default branch
9+
10+
# Add this permissions block to allow the workflow to push to the gh-pages branch
11+
permissions:
12+
contents: write
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
build-and-deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
27+
- name: Install Dependencies
28+
run: |
29+
pip install jupyter-book ghp-import ipykernel
30+
python -m ipykernel install --user --name=conda-base-py --display-name="Python 3"
31+
32+
- name: Build the Book
33+
run: |
34+
jupyter-book build .
35+
36+
- name: Deploy to GitHub Pages
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./_build/html

_config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# In _config.yml
2+
title: Python for Programmers with AI Case Studies in Persian
3+
author: Deitel & Deitel
4+
logo: ""
5+
6+
repository:
7+
url: https://github.com/MarziyehAghabalasafar/Python-for-Programmers-with-Introductory-AI-Case-Studies # Replace with your repo URL
8+
branch: main
9+
10+
html:
11+
use_issues_button: true
12+
use_repository_button: true
13+
14+
# This block controls how notebooks are executed
15+
execute:
16+
execute_notebooks: force
17+
kernel_name: python3
18+
allow_errors: true
19+
20+
# This block passes general settings to the builder
21+
sphinx:
22+
config:
23+
suppress_warnings: ["image.not_readable"]

_toc.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# In _toc.yml
2+
format: jb-book
3+
root: Chapters/01 - Introduction-to-Computers-and-Python/Chapter1
4+
chapters:
5+
- file: Chapters/02 - Introduction-to-Python-Programming/Chapter2
6+
- file: Chapters/03 - Control-Statements/Chapter3
7+
- file: Chapters/04 - Functions/Chapter4
8+
- file: Chapters/05 - Sequences-(Lists-and-Tuples)/Chapter5
9+
- file: Chapters/06 - Dictionaries-and-Sets/Chapter6
10+
- file: Chapters/07 - Array-Oriented-Programming-with-NumPy/Chapter7
11+
- file: Chapters/08 - Strings-(A-Deeper-Look)/Chapter8
12+
- file: Chapters/09 - Files-and-Exceptions/Chapter9
13+
- file: Chapters/10 - Object-Oriented-Programming/Chapter10
14+
# ... add a line for every notebook in the order you want them to appear

0 commit comments

Comments
 (0)