leptos-use/.github/workflows/book.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

2023-06-05 00:51:04 +01:00
on:
2023-07-03 16:10:58 +01:00
pull_request:
2023-06-05 00:51:04 +01:00
workflow_dispatch:
name: Book
permissions:
contents: read
pages: write
id-token: write
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
2023-06-05 01:51:53 +01:00
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: rust-src
2023-06-05 00:51:04 +01:00
- name: Install mdbook I
uses: taiki-e/install-action@v2
with:
tool: cargo-binstall,mdbook
- name: Install mdbook II
run: |
cargo binstall -y mdbook-cmdrun
2024-01-30 10:30:47 +01:00
cargo binstall -y trunk@0.17.5
2023-06-05 00:51:04 +01:00
rustup target add wasm32-unknown-unknown
- name: Cache
uses: Swatinem/rust-cache@v2
2023-06-05 00:51:04 +01:00
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build mdbook
run: |
cd docs/book
mdbook build
python3 post_build.py
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/book/book
- name: Deploy book to github pages
id: deployment
if: github.event_name != 'pull_request'
2023-06-05 00:51:04 +01:00
uses: actions/deploy-pages@v2