deploy client to github pages #191
Workflow file for this run
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 Deploy | |
on: | |
push: | |
branches: ["ebobo"] | |
paths: | |
- "client/**" | |
- "shared/**" | |
- ".github/workflows/github.yml" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build-and-deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Rust with WASM | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
target: wasm32-unknown-unknown | |
- name: Install Trunk | |
uses: jetli/[email protected] | |
- name: Build | |
working-directory: ./client | |
run: | | |
cargo build --target wasm32-unknown-unknown --release | |
- name: Build with Trunk | |
working-directory: ./client | |
run: | | |
trunk build --release | |
- name: Setup pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './client/dist' | |
- name: Deploy to pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |