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 09:24:15 UTC

[cordova-docs] branch master updated: feat!: migrate to gh-actions (#1186)

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

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new 839f34c  feat!: migrate to gh-actions (#1186)
839f34c is described below

commit 839f34c4ec090f982d557b3116609cc257a9f748
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Tue Aug 17 18:24:07 2021 +0900

    feat!: migrate to gh-actions (#1186)
    
    * feat: add gh-action for site deployment
    * ci!: remove travis ci deployment
    * ci: deploy asf configs
---
 .asf.yaml                    |  3 +++
 .github/workflows/deploy.yml | 41 +++++++++++++++++++++++++++++++++++++++++
 .travis.yml                  | 20 --------------------
 package.json                 |  5 +++--
 tools/bin/deploy.sh          | 24 ------------------------
 5 files changed, 47 insertions(+), 46 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 764de5c..bdd081d 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -45,3 +45,6 @@ notifications:
   issues:               issues@cordova.apache.org
   pullrequests_status:  issues@cordova.apache.org
   pullrequests_comment: issues@cordova.apache.org
+
+publish:
+  whoami:  asf-site
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/.travis.yml b/.travis.yml
deleted file mode 100644
index 5b66480..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-language: node_js
-node_js: 14
-sudo: false
-
-install:
-  - npm install
-  - bundle install
-
-script:
-  - npm test
-
-before_deploy:
-  - travis_wait 30 npm run build
-
-deploy:
-  skip_cleanup: true
-  provider: script
-  script: bash tools/bin/deploy.sh
-  on:
-    branch: master
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",
diff --git a/tools/bin/deploy.sh b/tools/bin/deploy.sh
deleted file mode 100755
index d465fc1..0000000
--- a/tools/bin/deploy.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-svn_url=https://svn.apache.org/repos/asf/cordova/site
-
-svn_q() { svn --quiet "$@"; }
-
-svn_with_auth() {
-    [ $svn_username ] && [ $svn_pass ] || {
-        echo 'ERROR: No SVN credentials given in $svn_username and $svn_pass'
-        exit 1
-    }
-    svn_q --non-interactive --no-auth-cache \
-          --username="$svn_username" --password="$svn_pass" "$@"
-}
-
-echo "Deploying website and docs to $svn_url"
-cd ..
-svn_q checkout "$svn_url" cordova-website
-cp -R cordova-docs/build-prod/. cordova-website/public/
-cd cordova-website
-svn_q add --force .
-svn_with_auth commit -m "Updated docs"

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