mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
build: pages deploy
This commit is contained in:
parent
4e812c396d
commit
b8dbb37b9b
49
.github/workflows/pages.yml
vendored
Normal file
49
.github/workflows/pages.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pages:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
|
||||||
|
- name: Set node version to 16
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- run: pnpm bootstrap
|
||||||
|
|
||||||
|
- name: Build VuePress site
|
||||||
|
run: npm run build:docs
|
||||||
|
|
||||||
|
- name: Build Playground site
|
||||||
|
run: npm run build:playground
|
||||||
|
|
||||||
|
- name: clean dist
|
||||||
|
run: rm -rf dist
|
||||||
|
|
||||||
|
- name: mkdir dist
|
||||||
|
run: mkdir dist && mkdir dist/docs && mkdir dist/playground
|
||||||
|
|
||||||
|
- name: move to dist
|
||||||
|
run: mv docs/dist/* dist/docs && mv playground/dist/* dist/playground
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: crazy-max/ghaction-github-pages@v2
|
||||||
|
with:
|
||||||
|
target_branch: gh-pages
|
||||||
|
build_dir: dist
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -3,8 +3,9 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"clean:top": "rimraf dist",
|
||||||
"dev": "vuepress dev src",
|
"dev": "vuepress dev src",
|
||||||
"build": "vuepress build src -d dist"
|
"build": "npm run clean:top && vuepress build src -d dist"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons": "0.0.11",
|
"@element-plus/icons": "0.0.11",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"version": "1.0.0-rc.7",
|
"version": "1.0.0-rc.7",
|
||||||
"name": "tmagic",
|
"name": "tmagic",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"packageManager": "pnpm@7.1.9",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "pnpm i && pnpm prepare && cd runtime/vue2 && npm i",
|
"bootstrap": "pnpm i && pnpm prepare && cd runtime/vue2 && npm i",
|
||||||
"clean:top": "rimraf */**/dist */dist coverage dwt*",
|
"clean:top": "rimraf */**/dist */dist coverage dwt*",
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
"version": "1.0.0-rc.6",
|
"version": "1.0.0-rc.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"clean:top": "rimraf dist",
|
||||||
"dev": "vite --mode vue3",
|
"dev": "vite --mode vue3",
|
||||||
"dev:vue2": "vite --mode vue2",
|
"dev:vue2": "vite --mode vue2",
|
||||||
"dev:react": "vite --mode react",
|
"dev:react": "vite --mode react",
|
||||||
"build": "node --max_old_space_size=8192 node_modules/vite/bin/vite.js build --mode vue3",
|
"build": "npm run clean:top && node --max_old_space_size=8192 node_modules/vite/bin/vite.js build --mode vue3",
|
||||||
"serve": "vite preview"
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user