2019-06-05 10:45:36 +08:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf gh-pages
|
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
echo "Cloning"
|
2020-08-21 16:46:01 +08:00
|
|
|
git clone -b gh-pages https://$GH_TOKEN@github.com/baidu/amis.git gh-pages
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
echo "building"
|
2020-09-11 17:30:00 +08:00
|
|
|
node ./scripts/generate-search-data.js
|
2020-08-21 11:51:35 +08:00
|
|
|
|
2020-09-16 23:41:51 +08:00
|
|
|
npm run build-schemas
|
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
fis3 release gh-pages -c
|
|
|
|
|
2020-09-16 23:41:51 +08:00
|
|
|
cp ./schema.json ./gh-pages
|
|
|
|
|
2020-08-27 11:11:50 +08:00
|
|
|
# 不走 cdn 了
|
2020-09-11 17:30:00 +08:00
|
|
|
# node ./scripts/upload2cdn.js $1 $2
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
echo "pushing"
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
cd gh-pages
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
git config user.email "liaoxuezhi@icloud.com"
|
|
|
|
git config user.name "liaoxuezhi"
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 16:19:26 +08:00
|
|
|
git add .
|
|
|
|
git commit --allow-empty -m "自动同步 gh-pages"
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 16:46:01 +08:00
|
|
|
git push --tags https://$GH_TOKEN@github.com/baidu/amis.git gh-pages
|
2019-06-05 10:45:36 +08:00
|
|
|
|
2020-08-21 11:51:35 +08:00
|
|
|
echo "done"
|