fix: mv website/* . and fix publish pipeline
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Aravinth Manivannan 2022-10-27 23:55:37 +05:30
parent b5a38d8c6a
commit 030221f258
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
13 changed files with 25 additions and 5 deletions

View file

View file

@ -4,7 +4,6 @@ pipeline:
when:
event: [push, pull_request, tag, deployment]
commands:
- cd website
- make env
- make
@ -15,7 +14,6 @@ pipeline:
branch: main
commands:
- pwd
- cd website
- pwd
- make ci-deploy
secrets: [repo_write_deploy_key]

View file

@ -15,6 +15,7 @@ ci-deploy: ## Deploy from CI/CD. Only call from within CI
git config --global user.name "${CI_COMMIT_AUTHOR}"
./scripts/zola.sh deploy pages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
./scripts/ci.sh --init "$$REPO_WRITE_DEPLOY_KEY"
./scripts/ci.sh --deploy pages
./scripts/ci.sh --clean
env: ## Download build dependencies and setup dev environment

View file

@ -1,5 +1,4 @@
/* Basic */
@import url("https://fonts.googleapis.com/css?family=Montserrat&display=swap");
html {
font-family: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI",
"Segoe UI Symbol", "Segoe UI Emoji", "Apple Color Emoji", Roboto,

View file

@ -55,7 +55,6 @@ set_ssh_remote() {
remote_hostname=$(echo $http_remote_url | cut -d '/' -f 3)
repository_owner=$(echo $http_remote_url | cut -d '/' -f 4)
repository_name=$(echo $http_remote_url | cut -d '/' -f 5)
ssh_remote="git@$remote_hostname:$repository_owner/$repository_name"
ssh_remote="git@codeberg.org:SocialCoding/gitea-open-letter.git"
git remote add $SSH_REMOTE_NAME $ssh_remote
}
@ -68,6 +67,18 @@ clean() {
fi
}
# $2: Deployment target branch
deploy() {
if (( "$#" < 1 ))
then
help
else
git -c core.sshCommand="/usr/bin/ssh -oStrictHostKeyChecking=no -i $SSH_ID_FILE"\
push --force $SSH_REMOTE_NAME $1
fi
}
if (( "$#" < 1 ))
then
help
@ -87,6 +98,14 @@ then
elif match_arg $1 '-c' '--clean'
then
clean
elif match_arg $1 '-d' '--deploy'
then
if (( "$#" < 2 ))
then
help
exit -1
fi
deploy $2
elif match_arg $1 '-h' '--help'
then
help

View file

@ -28,7 +28,7 @@ init() {
echo 'title = "Gitea Open Letter"' >> $file
echo "+++" >> $file
echo "" >> $file
cat ../README.md | tail -n +5 >> $file
cat README.md | tail -n +5 >> $file
}
init

View file

@ -96,6 +96,7 @@ deploy() {
cd $PROJECT_ROOT
original_branch=$(git branch --show-current)
tmp_dir=$(mktemp -d)
cp .domains $tmp_dir
cp -r $2/* $tmp_dir
if [[ -z $(git ls-remote --heads origin ${1}) ]]
@ -111,6 +112,8 @@ deploy() {
git rm -rf .
/bin/rm -rf *
cp -r $tmp_dir/* .
cp -r $tmp_dir/.domains .
git add .domains
git add --all
if [ $(git status --porcelain | xargs | sed '/^$/d' | wc -l) -gt 0 ];
then

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB