Deploy NAND #89
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: Deploy NAND | |
on: | |
push: | |
branches: ["gh-pages"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./src | |
steps: | |
- name: Initialize repository | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: "npm" | |
cache-dependency-path: "src/package-lock.json" | |
- name: Set up Rust | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo | |
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-rust- | |
- name: Install dependencies | |
run: | | |
npm install | |
cargo install wasm-pack | |
- name: Build NAND | |
run: | | |
npm run rwbuild | |
npm run build | |
- name: Setup pages | |
uses: actions/configure-pages@v4 | |
- name: Upload dist | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./src/dist" | |
- name: Deploy to pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |