41 lines
848 B
YAML
41 lines
848 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
cache-and-install:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
with:
|
|
version: 9
|
|
run_install: false
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "pnpm"
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
# https://github.com/Tencent/tdesign-vue-next/pull/1604#issuecomment-1236244550
|
|
- name: Surge
|
|
# pnpx surge token
|
|
run: |
|
|
cp dist/index.html dist/200.html
|
|
pnpx surge dist https://solid-ts-example.surge.sh --token ${{ secrets.SURGE_TOKEN }}
|