You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2021/08/17 08:10:08 UTC
[cordova-docs] 01/03: feat: add gh-action for site deployment
This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch feat/migrate-to-gh-actions
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git
commit 7c33c6f5e2cdb89b8d2d1271c9d1c5e100cae911
Author: Erisu <el...@gmail.com>
AuthorDate: Tue Aug 17 17:05:01 2021 +0900
feat: add gh-action for site deployment
---
.github/workflows/deploy.yml | 41 +++++++++++++++++++++++++++++++++++++++++
package.json | 5 +++--
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..951041f
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,41 @@
+name: deploy site
+
+on:
+ workflow_dispatch:
+ inputs:
+ dispatchReason:
+ description: 'Reason of Manual Deploy'
+ required: true
+ default: 'Re-run failed deployment'
+
+ push:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 2.7
+
+ - name: Environment Configure
+ run: |
+ npm install
+ bundle instal
+
+ - name: Test
+ run: npm test
+
+ - name: Build
+ run: npm run build:prod
+
+ - name: Deploy
+ uses: JamesIves/github-pages-deploy-action@releases/v3
+ with:
+ ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: asf-site
+ FOLDER: build-prod
diff --git a/package.json b/package.json
index bdb944a..14daf65 100644
--- a/package.json
+++ b/package.json
@@ -6,11 +6,12 @@
"doc": "doc"
},
"scripts": {
- "test": "npm run eslint && gulp build",
+ "test": "npm run eslint",
"serve": "gulp serve --prod",
"clean": "gulp clean",
"update-docs": "gulp snapshot",
- "build": "gulp build --prod",
+ "build": "gulp build",
+ "build:prod": "gulp build --prod",
"eslint": "eslint tools *.js"
},
"author": "Apache Software Foundation",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org