comit lock file #6
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: Build Rust & Deploy Leptos Page | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: wasm32-unknown-unknown | |
toolchain: nightly-x86_64-unknown-linux-gnu | |
components: rust-src | |
- uses: actions/checkout@v3 | |
- name: Run workspace tests | |
run: cargo test --workspace --verbose | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Install Trunk | |
uses: mbround18/[email protected] | |
- name: Build and Deploy Leptos Directory | |
run: cd crates/ && cd seed-site/ && trunk build --release --all-features | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: ./crates/seed-site/dist | |
destination: ./_site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |