linkerd fix3

This commit is contained in:
weyu 2025-04-26 15:14:23 +08:00
parent 35090ac16f
commit 8dc5e5091f
2 changed files with 19 additions and 19 deletions

View File

@ -10,6 +10,6 @@ jobs:
- uses: actions/checkout@v4
- name: Push To-To-To
run: |
/bin/bash build.sh https://github.com/kyverno/website.git
/bin/bash build.sh https://github.com/linkerd/website.git
src=`cat project_dir/ret-data|grep -v ^$|head -n 1`
./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 -f ${src} oss://cncfstack-website/

View File

@ -5,36 +5,36 @@ before_build(){
install_hugo_v136_5
install_postcss
# 注点意文档在这个目录中
cd linkerd.io
# 添加网站访问统计
sed -i 's|<head>|<head><script defer src="https://umami.cncfstack.com/script.js" data-website-id="ca77e090-43b0-494c-908a-f0183f0adb53"></script>|g' layouts/_default/baseof.html
echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="0f50e996-f7be-49d6-bc58-0ac6174f5c34"></script>' >> ./layouts/partials/head-meta.html
}
build(){
# mkdir output
# hugo \
# --environment production \
# --destination ./output \
# --cleanDestinationDir \
# --minify \
# --gc \
# --enableGitInfo \
# --baseURL https://linkerd.website.cncfstack.com
hugo \
--environment production \
--cleanDestinationDir \
--minify \
--gc \
--enableGitInfo \
--baseURL https://linkerd.website.cncfstack.com
make production-build
}
save_return(){
ls -lha
pwd
echo "${workdir}/output&oss://cncfstack-istio" > ${workdir}/ret-data
# ls -lha
# pwd
# echo "project_dir/output&oss://cncfstack-istio" > project_dir/ret-data
# 这行很重要,在其他关联项目中,文件名称必须要匹配
tarfile="kyverno.tgz"
tarfile="linkerd.tgz"
# 进入到site目录后进行打包,这样是为了便于部署时解压
# 进入到目录后进行打包,这样是为了便于部署时解压
tar -czf ${tarfile} -C public .
if [ ! -s ${tarfile} ];then
@ -56,7 +56,7 @@ after_build(){
cd project_dir
if cat .git/config |grep '/linkerd/website.git' ;then
echo "匹配到 istio"
echo "匹配到 linkerd"
before_build
build
after_build