Update deploy.yml #8
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 CI | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
override: true | |
profile: minimal | |
- name: Install Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install trunk | |
uses: jetli/[email protected] | |
with: | |
version: "latest" | |
- name: Install PNPM | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Compile css files | |
run: pnpm run css | |
- name: Build | |
run: trunk build --release --public-url=/ | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'dist' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |