Skip to content

Commit 0dbae56

Browse files
refactor project for jupyterlite deployment
1 parent 0c556bc commit 0dbae56

17 files changed

+225
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
- name: Install the dependencies
22+
run: |
23+
python -m pip install -r requirements.txt
24+
- name: Build the JupyterLite site
25+
run: |
26+
cp README.md content
27+
jupyter lite build --contents content --output-dir dist
28+
- name: Upload artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: ./dist
32+
33+
deploy:
34+
needs: build
35+
if: github.ref == 'refs/heads/main'
36+
permissions:
37+
pages: write
38+
id-token: write
39+
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
*.bundle.*
2+
lib/
3+
node_modules/
4+
.yarn-packages/
5+
*.egg-info/
6+
.ipynb_checkpoints
7+
*.tsbuildinfo
8+
9+
# Created by https://www.gitignore.io/api/python
10+
# Edit at https://www.gitignore.io/?templates=python
11+
12+
### Python ###
13+
# Byte-compiled / optimized / DLL files
14+
__pycache__/
15+
*.py[cod]
16+
*$py.class
17+
18+
# C extensions
19+
*.so
20+
21+
# Distribution / packaging
22+
.Python
23+
build/
24+
develop-eggs/
25+
dist/
26+
downloads/
27+
eggs/
28+
.eggs/
29+
lib/
30+
lib64/
31+
parts/
32+
sdist/
33+
var/
34+
wheels/
35+
pip-wheel-metadata/
36+
share/python-wheels/
37+
.installed.cfg
38+
*.egg
39+
MANIFEST
40+
41+
# PyInstaller
42+
# Usually these files are written by a python script from a template
43+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
44+
*.manifest
45+
*.spec
46+
47+
# Installer logs
48+
pip-log.txt
49+
pip-delete-this-directory.txt
50+
51+
# Unit test / coverage reports
52+
htmlcov/
53+
.tox/
54+
.nox/
55+
.coverage
56+
.coverage.*
57+
.cache
58+
nosetests.xml
59+
coverage.xml
60+
*.cover
61+
.hypothesis/
62+
.pytest_cache/
63+
64+
# Translations
65+
*.mo
66+
*.pot
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# pyenv
78+
.python-version
79+
80+
# celery beat schedule file
81+
celerybeat-schedule
82+
83+
# SageMath parsed files
84+
*.sage.py
85+
86+
# Spyder project settings
87+
.spyderproject
88+
.spyproject
89+
90+
# Rope project settings
91+
.ropeproject
92+
93+
# Mr Developer
94+
.mr.developer.cfg
95+
.project
96+
.pydevproject
97+
98+
# mkdocs documentation
99+
/site
100+
101+
# mypy
102+
.mypy_cache/
103+
.dmypy.json
104+
dmypy.json
105+
106+
# Pyre type checker
107+
.pyre/
108+
109+
# OS X stuff
110+
*.DS_Store
111+
112+
# End of https://www.gitignore.io/api/python
113+
114+
# jupyterlite
115+
*.doit.db
116+
_output
File renamed without changes.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ You can find a live demo on [mybinder](https://mybinder.org/v2/gh/ProbablyComput
99
If you're reading this on mybinder, click on the folder icon to the left to peruse the notebooks. Please follow them in order, because then it makes more sense.
1010

1111
# Table of Contents
12-
- [Intro To Python](Intro_To_Python.ipynb)
13-
- [Loops And Logic](Loops_And_Logic.ipynb)
14-
- [Arrays and Data Structures](Data_Structures.ipynb)
15-
- [Functions and Classes](Functions_and_Classes.ipynb)
16-
- [File I/O and Libraries](File_Handling_and_Packages.ipynb)
12+
- [Intro To Python](content/Intro_To_Python.ipynb)
13+
- [Loops And Logic](content/Loops_And_Logic.ipynb)
14+
- [Arrays and Data Structures](content/Data_Structures.ipynb)
15+
- [Functions and Classes](content/Functions_and_Classes.ipynb)
16+
- [File I/O and Libraries](content/File_Handling_and_Packages.ipynb)
1717

18-
Solutions to exercises are located in [solutions.ipynb](solutions.ipynb)
18+
Solutions to exercises are located in [solutions.ipynb](content/solutions.ipynb)
1919

2020
## about the project!
2121
so this project is as mentioned above, a series of python notebooks designed to teach someone with little to no programming experience the basics of programming in Python.
File renamed without changes.

0 commit comments

Comments
 (0)