thaw/.github/workflows/demo.yml

43 lines
1.3 KiB
YAML
Raw Normal View History

2023-11-05 17:22:24 +08:00
name: Deploy demo
on:
2024-01-17 17:12:55 +08:00
workflow_dispatch:
2023-11-05 17:22:24 +08:00
push:
paths: ["demo/**", "demo_markdown/**", "thaw/**"]
2023-11-05 17:22:24 +08:00
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
2024-01-17 23:46:00 +08:00
environment: demo
2023-11-05 17:22:24 +08:00
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Install Trunk
uses: jetli/trunk-action@v0.4.0
with:
2024-01-24 09:11:16 +08:00
version: "latest"
- name: Build
2023-11-05 17:22:24 +08:00
run: |
cd demo
trunk build --release
- name: Deploy
2024-01-17 22:49:38 +08:00
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: "--prod"
working-directory: demo/dist
2024-01-17 23:58:29 +08:00
vercel-project-name: thaw