You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/06/04 03:51:26 UTC

[echarts-handbook] branch master updated: use submodule for actions

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git


The following commit(s) were added to refs/heads/master by this push:
     new 413607f  use submodule for actions
413607f is described below

commit 413607fb92d711425a98323f307ca12e88417b22
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Jun 4 11:51:13 2021 +0800

    use submodule for actions
---
 .github/actions/github-pages-deploy-action |  1 +
 .github/workflows/deploy.yml               | 10 ++++++----
 .gitmodules                                |  3 +++
 build/deploy-gh.js                         | 11 -----------
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/.github/actions/github-pages-deploy-action b/.github/actions/github-pages-deploy-action
new file mode 160000
index 0000000..152627d
--- /dev/null
+++ b/.github/actions/github-pages-deploy-action
@@ -0,0 +1 @@
+Subproject commit 152627dfcbfb5c4af6be07f962841c4f3bf68af0
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 356d4aa..bbb3184 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -18,7 +18,9 @@ jobs:
           npm run build:gh
 
       - name: Deploy 🚀
-        run: |
-          node build/deploy-gh.js
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        uses: ./.github/actions/github-pages-deploy-action
+        with:
+          branch: gh-pages # The branch the action should deploy to.
+          folder: dist
+          single-commit: true
+          clean: true
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..d5bfe67
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule ".github/actions/github-pages-deploy-action"]
+	path = .github/actions/github-pages-deploy-action
+	url = https://github.com/JamesIves/github-pages-deploy-action
diff --git a/build/deploy-gh.js b/build/deploy-gh.js
deleted file mode 100644
index 17a97e8..0000000
--- a/build/deploy-gh.js
+++ /dev/null
@@ -1,11 +0,0 @@
-const run = require('@jamesives/github-pages-deploy-action').default
-const path = require('path')
-
-run({
-  token: process.env['GITHUB_TOKEN'],
-  branch: 'gh-pages',
-  folder: 'dist',
-  clean: true,
-  singleCommit: true,
-  workspace: path.join(__dirname, '../')
-})

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org