update build file
This commit is contained in:
parent
4e24c3178f
commit
ab585df66a
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
|
@ -1,35 +1,46 @@
|
||||||
name: Rust
|
name: Build and Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: ["master"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: ["master"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Wasm-pack
|
- name: Install Wasm-pack
|
||||||
run: cargo install wasm-pack
|
run: cargo install wasm-pack
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: wasm-pack build --target=bundler --dev --out-name index
|
run: wasm-pack build --target=bundler --dev --out-name index
|
||||||
|
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ./www
|
working-directory: ./www
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npx webpack
|
npx webpack
|
||||||
|
|
||||||
|
- name: Github Pages - Setup
|
||||||
|
uses: actions/configure-pages@v5
|
||||||
|
|
||||||
|
- name: Github Pages - Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: "./www/dist"
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user