-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (45 loc) · 1.43 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: "Dioxus Deploy"
author: "YuKun Liu <[email protected]>"
description: "Deploy your dioxus-web app online"
icon: "book"
color: "blue"
inputs:
buildMode:
description: "Build projects using different modes [default: 'release']"
required: true
default: "release"
toolchain:
description: "Build projects using a different rust toolchain [default: 'stable']"
required: true
default: "stable"
outDirectory:
description: "The `out_dir` property configured in Dioxus.toml [default: 'dist']"
required: true
default: "dist"
rootPath:
description: "Source code root path [default: '.']"
required: true
default: "."
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions-rs/[email protected]
with:
toolchain: ${{ inputs.toolchain }}
profile: minimal
target: wasm32-unknown-unknown
override: true
- uses: Swatinem/rust-cache@v2
- name: Install Dioxus-CLI
shell: bash
run: cargo install dioxus-cli
- name: Build Project 🎁
shell: bash
run: cd ${{ inputs.rootPath }} && dx build --${{ inputs.buildMode }} && cp ./${{ inputs.outDirectory }}/index.html ./${{ inputs.outDirectory }}/404.html
- name: Deploy Project 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ${{ inputs.rootPath }}/${{ inputs.outDirectory }}
clean: false