30 lines
913 B
YAML
30 lines
913 B
YAML
# https://cn.vitejs.dev/guide/static-deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
surge:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: yanhao98/composite-actions/setup-node-environment@main
|
|
- name: deploy
|
|
run: |
|
|
npx vite build
|
|
export DEPLOY_DOMAIN=https://vue-formkit-example.oo1.dev
|
|
cp dist/index.html dist/200.html
|
|
npx surge --project ./dist --domain $DEPLOY_DOMAIN --token d843de16b331c626f10771245c56ed93 # npx surge token
|
|
echo the preview URL is $DEPLOY_DOMAIN
|
|
netlify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: yanhao98/composite-actions/setup-node-environment@main
|
|
- name: deploy
|
|
run: |
|
|
npx vite build
|
|
npx netlify deploy --prod --dir dist
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: 9273cadf-2b0a-4616-bbd6-b06a33646100
|