feat: 更新 GitHub Actions 工作流,简化部署步骤并添加 Netlify 部署支持

This commit is contained in:
严浩
2024-11-22 14:27:59 +08:00
parent da85a6715d
commit 89da01a51b
3 changed files with 7988 additions and 18 deletions
+11
View File
@@ -16,3 +16,14 @@ jobs:
cp dist/index.html dist/200.html cp dist/index.html dist/200.html
npx surge --project ./dist --domain $DEPLOY_DOMAIN --token d843de16b331c626f10771245c56ed93 # npx surge token npx surge --project ./dist --domain $DEPLOY_DOMAIN --token d843de16b331c626f10771245c56ed93 # npx surge token
echo the preview URL is $DEPLOY_DOMAIN 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
+1 -3
View File
@@ -6,6 +6,4 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: yanhao98/composite-actions/setup-node-environment@main - uses: yanhao98/composite-actions/setup-node-environment@main
- name: deploy - run: npx vue-tsc -b
run: |
npx vue-tsc -b
+7976 -15
View File
File diff suppressed because it is too large Load Diff