Skip to content

Commit 3828d1a

Browse files
committed
update readme
1 parent d768d58 commit 3828d1a

File tree

1 file changed

+49
-13
lines changed

1 file changed

+49
-13
lines changed

README.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A native app built with Tauri version 2 that spawns a Python sub-process (sidecar) which starts a FastAPI server.
44

5+
<div align="center">
6+
57
[Download the example app and try out](https://github.com/dieharders/example-tauri-v2-python-server-sidecar/releases)
68

79
![Python](https://img.shields.io/badge/-Python-000?&logo=Python)
@@ -12,15 +14,30 @@ A native app built with Tauri version 2 that spawns a Python sub-process (sideca
1214
![NextJS](https://img.shields.io/badge/-NextJS-000?&logo=nextdotjs)
1315
![Tauri](https://img.shields.io/badge/-Tauri-000?&logo=Tauri)
1416

15-
> [!NOTE]
16-
>
17-
> <strong>Tauri v1 example also available:
18-
> <a href="https://github.com/dieharders/example-tauri-python-server-sidecar" style="color: #228be6">example-tauri-python-server-sidecar</a></strong>
17+
</div>
1918

2019
![logo](extras/sidecar-logo.png "python sidecar logo")
2120

21+
## Table of Contents
22+
23+
- [Introduction](#introduction)
24+
- [How It Works](#how-it-works)
25+
- [Features](#features)
26+
- [Project Structure](#project-structure)
27+
- [Getting Started](#getting-started)
28+
- [Deploy using your machine](#deploy-using-your-machine)
29+
- [Deploy using Github Actions](#deploy-using-github-actions)
30+
- [Issues](#issues)
31+
- [Todo's](#todos)
32+
- [Learn More](#learn-more)
33+
2234
## Introduction
2335

36+
> [!NOTE]
37+
>
38+
> <strong>Tauri v1 example also available:
39+
> <a href="https://github.com/dieharders/example-tauri-python-server-sidecar" style="color: #228be6">example-tauri-python-server-sidecar</a></strong>
40+
2441
This example app uses Next.js as the frontend and Python (FastAPI) as the backend. Tauri is a Rust framework that orchestrates the frontend and backend(s) into a native app experience.
2542

2643
This template project is intended to demonstrate the use of single file Python executables with Tauri v2.
@@ -106,11 +123,11 @@ Run the app in development mode:
106123
pnpm tauri dev
107124
```
108125

109-
### Build
126+
## Deploy using your machine
110127

111-
#### Compile python sidecar
128+
### 1. Compile Python sidecar
112129

113-
Run this at least once before running `pnpm tauri dev` and each time you make changes to your python code. This command is also called by `pnpm tauri build`:
130+
Run this at least once before running `pnpm tauri dev` or `pnpm tauri build` and each time you make changes to your python code:
114131

115132
```bash
116133
pnpm build:sidecar-winos
@@ -128,15 +145,20 @@ pip install -U pyinstaller
128145

129146
A note on compiling Python exe (the -F flag bundles everything into one .exe). You won't need to run this manually each build, I have included it in the build scripts.
130147

131-
---
148+
### 2. Build Next.js (optional)
149+
150+
Build the static html files that tauri will serve as your front-end.
151+
152+
```bash
153+
pnpm run build
154+
```
132155

133-
#### Build for production
156+
### 3. Build tauri (and Next.js)
134157

135-
Build the production app for a specific OS:
158+
Tauri will run the "build" script (which does the same as the previous step) before it builds the tauri app, see `tauri.conf.json` file. You can edit what script it runs in the `beforeBuildCommand`.
159+
Build the production app on your machine for a specific OS:
136160

137161
```bash
138-
# Uses `pnpm build:sidecar-winos` by default
139-
# Modify script for your target OS
140162
pnpm tauri build
141163
```
142164

@@ -148,7 +170,21 @@ And the raw executable here:
148170

149171
- `<project-dir>\src-tauri\target\release`
150172

151-
## Issue's ?
173+
## Deploy using Github Actions
174+
175+
Fork this repo in order to access a manual trigger to build for each platform (Windows, MacOS, Linux) and upload a release. You can then modify the `release.yml` file to suit your specific app's build pipeline needs. Workflow permissions must be set to "Read and write". Any git tags created before a workflow existed will not be usable for that workflow.
176+
177+
Initiate the Workflow Manually:
178+
179+
1. Navigate to the "Actions" tab in your GitHub repository.
180+
2. Select the "Manual Tauri Release" workflow.
181+
3. Click on "Run workflow" and provide the necessary inputs:
182+
183+
- release_name: The title of the release.
184+
- release_notes (optional): Notes or changelog for the release.
185+
- release_type: ("draft", "public", "private")
186+
187+
## Issues?
152188

153189
- "Failed to fetch" error: In `src/backends/main.py` CORS expects your UI is running on localhost:3000. If not, add your url to the `origins = []` array or set:
154190

0 commit comments

Comments
 (0)