Skip to content

Commit

Permalink
Web Serial library and demo (#125)
Browse files Browse the repository at this point in the history
- reworked smartknobjs into separate smartknobjs-node and
smartknobjs-webserial packages
- configured CI to build and deploy webserial example to
https://scottbez1.github.io/smartknob/
  • Loading branch information
scottbez1 committed Jun 20, 2023
1 parent 948297f commit 1d2458b
Show file tree
Hide file tree
Showing 62 changed files with 6,184 additions and 5,698 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/electronics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ name: Export Electronics

on:
push:
paths:
- 'electronics'
- 'util'
- 'scripts'
- '.github/workflows/electronics.yml'
pull_request:
paths:
- 'electronics'
- 'util'
- 'scripts'
- '.github/workflows/electronics.yml'

jobs:
export-electronics:
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: JS

on:
push:
paths:
- 'software/js'
- 'proto'
- '.github/workflows/js.yml'
pull_request:
paths:
- 'software/js'
- 'proto'
- '.github/workflows/js.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
working-directory: software/js
run: npm ci
- name: Build
working-directory: software/js
run: PUBLIC_URL="/smartknob" npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './software/js/packages/example-webserial-timeline/build'

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.repository == 'scottbez1/smartknob' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
12 changes: 12 additions & 0 deletions .github/workflows/pio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@ name: PlatformIO CI

on:
push:
paths:
- 'firmware'
- 'proto'
- 'thirdparty/nanopb'
- 'platformio.ini'
- '.github/workflows/pio.yml'
pull_request:
paths:
- 'firmware'
- 'proto'
- 'thirdparty/nanopb'
- 'platformio.ini'
- '.github/workflows/pio.yml'

jobs:
pio-build:
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"files.associations": {
"cstddef": "cpp",
"limits": "cpp"
},
}
Loading

0 comments on commit 1d2458b

Please sign in to comment.