Skip to content

Commit

Permalink
github actions for docs deploy + minor changes in readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
pelinski committed Aug 8, 2024
1 parent bfe6cd8 commit d08f165
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Documentation to GitHub Pages

on:
push:
branches:
- dev # Change this to your default branch if it's not 'main'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Specify the Python version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev
- name: Build documentation
run: |
pipenv run pandoc -s readme.md -o docs/readme.rst
pipenv run sphinx-build -M html docs/ docs/_build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
12 changes: 10 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ pip install pybela

### 2. Set the Bela branch to `dev`

In order to use pybela, you will need to use the `dev` branch of the Bela code.
`pybela` is relies on the `watcher` library, which currently only works with the Bela `dev` branch. To set your Bela to the `dev` branch, you can follow the instructions below.

**Note:** if you just flashed the Bela image, the date and time on the Bela board might be wrong, and the Bela libraries might not build correctly after changing the Bela branch. To set the correct date, you can either run (in the host)

```bash
ssh [email protected] "date -s \"`date '+%Y%m%d %T %z'`\""
```
or just open the IDE in your browser (type `bela.local` in the address bar).

#### Option A: Bela connected to internet

Expand All @@ -30,7 +37,7 @@ If your Bela is connected to internet, you can ssh into your Bela (`ssh root@bel
# in Bela
cd Bela
git checkout dev
git pull
make -f Makefile.libraries cleanall && make coreclean
```

#### Option B: Bela not connected to internet
Expand Down Expand Up @@ -59,6 +66,7 @@ Then ssh into your Bela (`ssh [email protected]`) and change the branch:
# in Bela
cd Bela
git checkout tmp
make -f Makefile.libraries cleanall && make coreclean
```

You can check the commit hash by running `git rev-parse --short HEAD` either on Bela or your laptop.
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
version="0.1.0",
author="Teresa Pelinski",
author_email="[email protected]",
description="pybela allows interfacing with Bela, the embedded audio platform, using Python. pybela provides a convenient way to stream, log, and monitor sensor data from your Bela device to your laptop, or alternatively, to send values to a Bela program from your laptop.",
description="pybela allows interfacing with Bela, the embedded audio platform, using Python. pybela provides a convenient way to stream, log, and monitor sensor data from your Bela device to your laptop, or alternatively, to stream values to a Bela program from your laptop.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/BelaPlatform/pybela",
Expand All @@ -24,7 +24,8 @@
"ipykernel",
"nest-asyncio",
"aiofiles",
"paramiko"],
"paramiko",
"numpy==1.26"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit d08f165

Please sign in to comment.