From f102ad9e98d5cc324d386546c7c9beef8ec0195b Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Thu, 23 Mar 2023 17:53:16 +0000 Subject: [PATCH] ci(builds.sr.ht): implement adjustments for secrets detection on deploy Signed-off-by: Andrei Jiroh Halili --- .build.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.build.yml b/.build.yml index f3a60f3..a047eee 100644 --- a/.build.yml +++ b/.build.yml @@ -1,4 +1,6 @@ image: alpine/edge +environment: + FF_ENABLE_COMMIT_DATA: "true" packages: - openssh-client - python3 @@ -36,20 +38,24 @@ tasks: - generate-archive: | cd tildeweb tar cvzf tildeweb-prod-build.tar.gz public public_ctrl-c public_pages.dev - #- deploy: | - # if [ "$BUILD_REASON" == "patchset" ] && [ "$BUILD_SUBMITTER" == "hub.sr.ht" ]; then - # complete-build - # fi - # - # cd tildeweb - # echo "StrictHostKeyChecking=no" >> ~/.ssh/config - # eval $(ssh-agent) && ssh-add ~/.ssh/passwordless-auth-sshfs - # rsync -rP public ajhalili2006@vern.cc:/home/ajhalili2006/public_html/ - # rsync -rP public_ctrl-c ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html/ - # #rsync -rP gmi ajhalili2006@vern.cc:/home/ajhalili2006/public_gemini/ - # #rsync -rP gmi ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_gemini/ - # - # git push origin -o skip-ci - # git remote set-url lab ssh://git@mau.dev/ajhalili2006/tildeverse-web && git push lab main + - deploy: | + if [ "$BUILD_REASON" == "patchset" ] && [ "$BUILD_SUBMITTER" == "hub.sr.ht" ]; then + complete-build + exit 0 + elif [ ! -f "$HOME/.ssh/passowrdless-auth-sshfs" ]; then + complete-build + exit 0 + fi + + cd tildeweb + echo "StrictHostKeyChecking=no" >> ~/.ssh/config + eval $(ssh-agent) && ssh-add ~/.ssh/passwordless-auth-sshfs + rsync -rP public ajhalili2006@vern.cc:/home/ajhalili2006/public_html/ || true + rsync -rP public_ctrl-c ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html/ || true + #rsync -rP gmi ajhalili2006@vern.cc:/home/ajhalili2006/public_gemini/ + #rsync -rP gmi ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_gemini/ + + git push origin -o skip-ci + git remote set-url lab ssh://git@mau.dev/ajhalili2006/tildeverse-web && git push lab main artifacts: - tildeweb/tildeweb-prod-build.tar.gz \ No newline at end of file