Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/modal-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Modal service

on:
push:
branches: [main]
paths:
- "run-service/**"
workflow_dispatch:

concurrency:
group: modal-deploy
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: run-service
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- run: pip install modal

- run: python -m py_compile modal_app.py

- run: modal deploy modal_app.py
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ The core separation happens in `run-service/modal_app.py`:

Copy the web endpoint URL to your `.env.local`.

**Automatic deploys:** `.github/workflows/modal-deploy.yml` runs `modal deploy` whenever a
push to `main` touches `run-service/` (or manually via *Actions → Deploy Modal service → Run
workflow*). Add `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET` as repository Actions secrets
(create a token at https://modal.com/settings/tokens).

To test the service without the frontend:
```bash
modal run modal_app.py --path ./sermon.mp3 --out-dir ./out
Expand Down