ソースを参照

test: gh-pages theme

richard1015 3 年 前
コミット
ad54f1c1a9

+ 19 - 0
.github/workflows/gh-pages.yml

@@ -0,0 +1,19 @@
+name: github pages
+
+on:
+  push:
+    branches:
+      - theme # default branch
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - run: yarn install
+      - run: yarn build:site
+      - name: Deploy
+        uses: peaceiris/actions-gh-pages@v3
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: ./dist

+ 0 - 18
.github/workflows/issue-reply.yml

@@ -1,18 +0,0 @@
-name: Issue Reply
-
-on:
-  issues:
-    types: [labeled]
-
-jobs:
-  issue-reply:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Need Reproduce
-        if: github.event.label.name == 'Need Reproduce'
-        uses: actions-cool/issues-helper@v1
-        with:
-          actions: 'create-comment'
-          issue-number: ${{ github.event.issue.number }}
-          body: |       
-            你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/s/eh6ck?resolutionWidth=414&resolutionHeight=736) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。

+ 0 - 30
.github/workflows/sync-docs.yml

@@ -1,30 +0,0 @@
-name: sync to docs
-
-on:
-  push:
-    branches:
-      - next # default branch
-    paths:
-      - '.github/workflows/**'
-      - 'src/**'
-
-jobs:
-  copy:
-    runs-on: ubuntu-latest  
-    steps:
-      - uses: actions/checkout@v2 
-      - run: yarn install
-      - run: yarn copydocs
-      - name : Sync 
-        uses : JamesIves/github-pages-deploy-action@4.1.7 
-        with :
-          branch : master # action 应该部署到的分支 。
-          folder : site_docs #操作应该部署的文件夹 。
-          clean: false
-          repository-name: jdf2e/nutui-docs
-          token: ${{ secrets.GIT_ACTION }}
-          target-folder: src/docs_vue
-
-     
-
-          

+ 0 - 17
.github/workflows/sync-gitcode.yml

@@ -1,17 +0,0 @@
-name: Sync to Gitcode
-
-on:
-  push:
-    branches: [next]
-
-jobs:
-  deploy-site-sync-gitcode:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Sync to Gitcode
-        uses: wearerequired/git-mirror-action@master
-        env:
-          SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
-        with:
-          source-repo: git@github.com:jdf2e/nutui.git
-          destination-repo: git@gitcode.net:jd/nutui.git

+ 0 - 17
.github/workflows/sync-gitee.yml

@@ -1,17 +0,0 @@
-name: Sync to Gitee
-
-on:
-  push:
-    branches: [next]
-
-jobs:
-  deploy-site-sync-gitee:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Sync to Gitee
-        uses: wearerequired/git-mirror-action@master
-        env:
-          SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
-        with:
-          source-repo: git@github.com:jdf2e/nutui.git
-          destination-repo: git@gitee.com:jd-platform-opensource/nutui.git

+ 0 - 14
.github/workflows/test.yml

@@ -1,14 +0,0 @@
-name: test
-
-on:
-  push:
-    branches:
-      - next # default branch
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
-      - run: yarn install
-      - run: yarn test

+ 3 - 8
vite.config.ts

@@ -89,18 +89,13 @@ export default defineConfig({
   ],
   build: {
     target: 'es2015',
-    outDir: './dist/3x/',
+    outDir: './dist/theme/',
     // assetsDir: config.version,
     cssCodeSplit: true,
     rollupOptions: {
       input: {
-        // doc: resolve(__dirname, 'index.html'),
-        mobile: resolve(__dirname, 'demo.html')
-      },
-      output: {
-        entryFileNames: `demo-${config.version}/[name].js`,
-        chunkFileNames: `demo-${config.version}/[name].js`,
-        assetFileNames: `demo-${config.version}/[name].[ext]`
+        doc: resolve(__dirname, 'index.html')
+        // mobile: resolve(__dirname, 'demo.html')
       }
     }
   }