mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
travis ci
This commit is contained in:
parent
ba982068af
commit
cb4539533b
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@ -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
Block a user