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:
|
2024-01-03 20:52:56 +08:00
|
|
|
paths: ["demo/**", "demo_markdown/**", "thaw/**"]
|
2023-11-05 17:22:24 +08:00
|
|
|
branches:
|
|
|
|
- main
|
2024-01-17 17:12:55 +08:00
|
|
|
|
2023-11-05 17:22:24 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-01-17 16:53:28 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: 18
|
2023-11-05 17:22:24 +08:00
|
|
|
- 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-16 23:41:42 +08:00
|
|
|
version: "v0.17.5"
|
2024-01-17 16:53:28 +08:00
|
|
|
- name: Build
|
2023-11-05 17:22:24 +08:00
|
|
|
run: |
|
|
|
|
cd demo
|
|
|
|
trunk build --release
|
2024-01-17 16:53:28 +08:00
|
|
|
- name: Deploy
|
2024-01-17 17:31:04 +08:00
|
|
|
run: npx vercel --token ${{ secrets.VERCEL_TOKEN }} --prod
|
2024-01-17 16:53:28 +08:00
|
|
|
env:
|
|
|
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|