travis ci
This commit is contained in:
parent
ba982068af
commit
cb4539533b
|
@ -0,0 +1,5 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
before_script: npm i
|
||||
script: sh deploy-gh-pages.sh
|
|
@ -3,8 +3,8 @@ const fs = require('fs');
|
|||
const walk = require('fs-walk');
|
||||
const path = require('path');
|
||||
|
||||
const ak = process.argv[2];
|
||||
const sk = process.argv[3];
|
||||
const ak = process.env.BOS_AK;
|
||||
const sk = process.env.BOS_SK;
|
||||
|
||||
if (!ak || !sk) {
|
||||
console.error('ak and sk is required for deploy cdn!');
|
||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
|||
rm -rf gh-pages
|
||||
|
||||
echo "Cloning"
|
||||
git clone -b gh-pages https://github.com/baidu/amis.git gh-pages
|
||||
git clone -b gh-pages https://$GH_TOKEN@github.com/baidu/amis.git gh-pages
|
||||
|
||||
echo "building"
|
||||
node ./build/generate-search-data.js
|
||||
|
@ -23,6 +23,6 @@ git config user.name "liaoxuezhi"
|
|||
git add .
|
||||
git commit --allow-empty -m "自动同步 gh-pages"
|
||||
|
||||
git push --tags https://github.com/baidu/amis.git gh-pages
|
||||
git push --tags https://$GH_TOKEN@github.com/baidu/amis.git gh-pages
|
||||
|
||||
echo "done"
|
||||
|
|
Loading…
Reference in New Issue