crossplane
This commit is contained in:
parent
ab20a8e505
commit
aa0e91887e
|
@ -0,0 +1,40 @@
|
|||
name: To-To-To Crossplane
|
||||
on:
|
||||
schedule:
|
||||
- cron: "15 3 * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Crossplane 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/crossplane/docs.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
|
1
all.list
1
all.list
|
@ -19,3 +19,4 @@ https://github.com/jaegertracing/documentation.git
|
|||
https://github.com/grpc/grpc.io.git
|
||||
https://github.com/dapr/docs.git
|
||||
https://github.com/emissary-ingress/emissary-ingress.dev.git
|
||||
https://github.com/crossplane/docs.git
|
|
@ -1 +1 @@
|
|||
https://github.com/emissary-ingress/emissary-ingress.dev.git
|
||||
https://github.com/crossplane/docs.git
|
|
@ -0,0 +1,43 @@
|
|||
workdir=$1
|
||||
initdir=$2
|
||||
|
||||
source ${initdir}/libs/common.sh
|
||||
|
||||
before_crossplane_website(){
|
||||
install_hugo_v145
|
||||
npm install
|
||||
|
||||
|
||||
# 添加网站访问统计
|
||||
echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="9b8051a7-fd5d-4cec-b8fe-3e9ec82cfad1"></script>' >> ./themes/geekboot/layouts/partials/favicons.html
|
||||
|
||||
}
|
||||
|
||||
after_crossplane_website(){
|
||||
|
||||
mkdir output
|
||||
hugo \
|
||||
--destination ./output \
|
||||
--cleanDestinationDir \
|
||||
--minify \
|
||||
--gc \
|
||||
--enableGitInfo \
|
||||
--baseURL https://crossplane.cncfstack.com
|
||||
|
||||
}
|
||||
|
||||
save_return(){
|
||||
ls -lha
|
||||
pwd
|
||||
echo "${workdir}/output&oss://cncfstack-crossplane" > ${workdir}/ret-data
|
||||
}
|
||||
|
||||
|
||||
cd $workdir
|
||||
if cat .git/config |grep '/crossplane/docs.git' ;then
|
||||
echo "=============================================> 匹配到 crossplane"
|
||||
before_crossplane_website
|
||||
after_crossplane_website
|
||||
find_and_sed_v2 "./output"
|
||||
save_return
|
||||
fi
|
|
@ -13,7 +13,7 @@ before_emissary-ingress_website(){
|
|||
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
|
||||
echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="1f96240b-84a8-46d7-85ce-3396d889e9a7"></script>' >> ./themes/docsy/layouts/partials/favicons.html
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue