Skip to content

Commit

Permalink
Updated readme regarding desktop bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
albbus-stack committed May 24, 2024
1 parent 55af029 commit db3898e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Install development dependencies
run: sudo apt-get install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev libxdo-dev
run: sudo apt-get install -y build-essential libgtk-3-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev libxdo-dev

- name: Install Bun
uses: oven-sh/setup-bun@v1
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
cp icons/[email protected] dist/resources/[email protected]
- name: Build
run: mv Cargo.toml Cargo.toml.bak && cp Cargo.desktop.toml Cargo.toml && WEBKIT_DISABLE_COMPOSITING_MODE=1 dx bundle --platform desktop --release
run: mv Cargo.toml Cargo.toml.bak && cp Cargo.desktop.toml Cargo.toml && WEBKIT_DISABLE_COMPOSITING_MODE=1 dx bundle --platform desktop --release --package deb

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@ strip = true
incremental = false
```

- If you want to use Github Actions to deploy the app you should add the following secrets in the repository settings:

```text
API_URL (for the web app) -> update this after your API deployment
APP_URL (for the API) -> update this after your web deployment
SUPABASE_URL
SUPABASE_API_KEY
SUPABASE_JWT_SECRET
DATABASE_URL
```

### API

- Install the `flyctl` CLI using `curl -L https://fly.io/install.sh | sh` and login with your [Fly.io account](https://fly.io) using `fly auth login`.
Expand All @@ -159,7 +170,13 @@ incremental = false

### Web

- To deploy the web app using Github Pages you have to add the following secrets in the repository settings: `API_URL`, `SUPABASE_URL`, `SUPABASE_API_KEY`, `SUPABASE_JWT_SECRET`, `DATABASE_URL`. In the pages settings choose the `gh-pages` branch. You should also set workflow permissions under the actions settings to `Read and write permissions`.
- To deploy the web app using Github Pages you have to choose in the repository settings under Pages the `gh-pages` branch. You should also set workflow permissions under the Actions settings to `Read and write permissions`.
- Change the `base_path` in the `Dioxus.pages.toml` file to match the name of your repository.
- Remember to deploy your api with `APP_URL` set to your Github Pages domain (e.g. `https://albbus-stack.github.io`) otherwise there will be CORS errors.
- Configure the `.github/workflows/web.yaml` file to deploy on every push to the `main` branch or manually with the `workflow_dispatch` event.
- Configure the `.github/workflows/deploy-web.yaml` workflow to deploy on every push to the `main` branch or manually with the `workflow_dispatch` event.

### Desktop

> Github actions for the Windows, Linux and MacOS platforms are not yet functioning since `dx bundle` fails with various errors.
- Currently `dx bundle` is being actively developed and is not yet ready for production use, so you should use `dx build` if bundling fails (this is not good since you need attach the `dist` folder to your release to include your assets).

0 comments on commit db3898e

Please sign in to comment.