amis/deploy-gh-pages.sh

29 lines
497 B
Bash
Raw Normal View History

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-08-21 11:51:35 +08:00
node ./build/generate-search-data.js
2020-08-21 16:19:26 +08:00
fis3 release gh-pages -c
node ./build/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"