Skip to content

Update visp-build.yml #36

Update visp-build.yml

Update visp-build.yml #36

Workflow file for this run

name: VISP Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Get rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.85.0
targets: x86_64-pc-windows-msvc,wasm32-unknown-unknown
- uses: cargo-bins/cargo-binstall@main
- uses: Swatinem/rust-cache@v2
# Look for a fix with bundling.
- name: Install Dioxus CLI
run: cargo binstall --no-confirm [email protected]
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
- run: |
npm --version
npx --version
- name: Build Web
run: dx build --platform web --release
- name: Archive Web Production Artifacts
uses: actions/upload-artifact@v4
with:
name: web-dist
path: |
/home/runner/work/VISP/VISP/target/dx/visp/release/web/public/assets
/home/runner/work/VISP/VISP/target/dx/visp/release/web/public/index.html
- name: Debug
run: ls -la
- name: Deploy to Vercel
if: "github.event_name == 'push' && endsWith(github.ref, 'refs/heads/main')" # Deploy to prod if it is a push to `main`
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-args: '--prod'
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # Required
vercel-project-id: ${{ secrets.VERCEL_PROJ_ID }} # Required
working-directory: /home/runner/work/VISP/VISP/target/dx/visp/release/web/public
- name: Build and Bundle Desktop
run: dx bundle --platform desktop --release
- name: Archive Desktop Production Artifacts
uses: actions/upload-artifact@v4
with:
name: desktop-dist
path: |
/home/runner/work/VISP/VISP/target/dx/visp/release/desktop/assets/
/home/runner/work/VISP/VISP/target/dx/visp/release/desktop/visp.exe