fix deployment pipeline #7
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 to GitHub Pages" | |
on: | |
push: | |
branches: ["main"] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install wasm | |
run: cargo install wasm-pack | |
- name: Build wasm | |
run: cd wasm && wasm-pack build --target web --out-name wasm --out-dir ../web/wasm | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "22" | |
- name: Install dependencies | |
run: cd web && yarn | |
- name: Build | |
run: cd web && yarn build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./web/dist | |
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@v4 |