add emissary-ingress
This commit is contained in:
parent
cb8d1c7e10
commit
ab20a8e505
|
@ -0,0 +1,40 @@
|
||||||
|
name: To-To-To Emissary-Ingress
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "15 3 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Emissary-Ingress To-To-To
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
|
||||||
|
source libs/aliyun.sh
|
||||||
|
install_aliyun_ossutil
|
||||||
|
|
||||||
|
initdir=`pwd`
|
||||||
|
|
||||||
|
source ${initdir}/libs/common.sh
|
||||||
|
|
||||||
|
cat ${initdir}/sed/* > ${initdir}/toto.sed
|
||||||
|
|
||||||
|
for project in "https://github.com/emissary-ingress/emissary-ingress.dev.git"
|
||||||
|
do
|
||||||
|
|
||||||
|
uuid=`date "+%s%N"`
|
||||||
|
workdir="${initdir}/tmp/${uuid}"
|
||||||
|
mkdir -p $workdir
|
||||||
|
|
||||||
|
git clone $project $workdir
|
||||||
|
ls $workdir
|
||||||
|
|
||||||
|
find ./webs -name toto.sh -exec /bin/bash {} $workdir $initdir \;
|
||||||
|
|
||||||
|
src=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $1}'`
|
||||||
|
dest=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $2}'`
|
||||||
|
|
||||||
|
./ossutil --access-key-id ${{ secrets.ALIYUN_CYG_OSS_AK }} --access-key-secret ${{ secrets.ALIYUN_CYG_OSS_SK }} --endpoint ${{ secrets.ALIYUN_CYG_OSS_ENDPOINT }} --region ${{ secrets.ALIYUN_CYG_OSS_REGION }} cp -fr $src $dest
|
||||||
|
done
|
3
all.list
3
all.list
|
@ -17,4 +17,5 @@ https://github.com/etcd-io/website.git
|
||||||
https://github.com/coredns/coredns.io.git
|
https://github.com/coredns/coredns.io.git
|
||||||
https://github.com/jaegertracing/documentation.git
|
https://github.com/jaegertracing/documentation.git
|
||||||
https://github.com/grpc/grpc.io.git
|
https://github.com/grpc/grpc.io.git
|
||||||
https://github.com/dapr/docs.git
|
https://github.com/dapr/docs.git
|
||||||
|
https://github.com/emissary-ingress/emissary-ingress.dev.git
|
|
@ -1 +1 @@
|
||||||
https://github.com/dapr/docs.git
|
https://github.com/emissary-ingress/emissary-ingress.dev.git
|
|
@ -0,0 +1,47 @@
|
||||||
|
workdir=$1
|
||||||
|
initdir=$2
|
||||||
|
|
||||||
|
source ${initdir}/libs/common.sh
|
||||||
|
|
||||||
|
before_emissary-ingress_website(){
|
||||||
|
install_hugo_v145
|
||||||
|
|
||||||
|
npm install
|
||||||
|
npm run prepare
|
||||||
|
|
||||||
|
ls -lha
|
||||||
|
echo "------------------"
|
||||||
|
ls -lhathemes/docsy/
|
||||||
|
# 添加网站访问统计
|
||||||
|
echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="f376f6f7-74a6-41b4-9455-d7722b3f4af5"></script>' >> ./themes/docsy/layouts/partials/favicons.html
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
after_emissary-ingress_website(){
|
||||||
|
|
||||||
|
mkdir output
|
||||||
|
hugo \
|
||||||
|
--destination ./output \
|
||||||
|
--cleanDestinationDir \
|
||||||
|
--minify \
|
||||||
|
--gc \
|
||||||
|
--enableGitInfo \
|
||||||
|
--baseURL https://emissary-ingress.cncfstack.com
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
save_return(){
|
||||||
|
ls -lha
|
||||||
|
pwd
|
||||||
|
echo "${workdir}/output&oss://cncfstack-emissary-ingress" > ${workdir}/ret-data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cd $workdir
|
||||||
|
if cat .git/config |grep '/emissary-ingress/emissary-ingress.dev.git' ;then
|
||||||
|
echo "=============================================> 匹配到 emissary-ingress"
|
||||||
|
before_emissary-ingress_website
|
||||||
|
after_emissary-ingress_website
|
||||||
|
find_and_sed_v2 "./output"
|
||||||
|
save_return
|
||||||
|
fi
|
Loading…
Reference in New Issue