From 0b2b280b84c671a9f89299bdf488f3feea41d3ae Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Sat, 20 Jan 2024 17:42:17 -0300 Subject: [PATCH] ci: github pages --- .github/workflows/gh-pages.yml | 32 ++++++++++++++++++++++++++++++++ Dioxus.toml | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..f587044 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,32 @@ +name: GitHub Pages + +env: + CARGO_TERM_COLOR: always + +on: + push: + branches: + - main + +jobs: + build-deploy: + runs-on: ubuntu-latest + permissions: + # For the push to `gh-pages` branch. + contents: write + pages: write + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - name: Install Dioxus + run: cargo install dioxus-cli + - name: Build app + run: dx build --release + - name: Deploy Project 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: dist diff --git a/Dioxus.toml b/Dioxus.toml index d888340..4c0df2d 100644 --- a/Dioxus.toml +++ b/Dioxus.toml @@ -13,9 +13,9 @@ out_dir = "dist" asset_dir = "assets" [web.app] - # HTML title tag content title = "Sudoku in the Browser" +base_path = "sudoku" [web.watcher]