Only show search results from the current version of the docs (#396) #414
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github pages | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_INCREMENTAL: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-all-crates: "true" | |
cache-on-failure: "true" | |
- uses: cargo-bins/cargo-binstall@main | |
- name: Install CLI | |
run: cargo binstall dioxus-cli -y --force --version 0.6 | |
- name: Build | |
run: DIOXUS_LOG=dx=trace dx build --platform web --fullstack --features fullstack --release --ssg | |
- name: Copy output | |
run: cp -r target/dx/dioxus_docs_site/release/web/public docs | |
- name: Add gh pages 404 | |
run: cp docs/index.html docs/404.html | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4.2.3 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs # The folder the action should deploy. | |
target-folder: . | |
clean: true | |
# - name: Install CLI | |
# run: cargo install --force --git https://github.com/DioxusLabs/dioxus dioxus-cli --locked |