fix: CI: clear repo before publishing site
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
da917bce95
commit
f5c8c7a737
2 changed files with 7 additions and 4 deletions
|
@ -8,10 +8,9 @@ ci-deploy: ## Deploy from CI/CD. Only call from within CI
|
|||
fi
|
||||
git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL}"
|
||||
git config --global user.name "${CI_COMMIT_AUTHOR}"
|
||||
./scripts/ci.sh --publish librepages dist "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
|
||||
find
|
||||
./scripts/ci.sh --init "$$GITEA_WRITE_DEPLOY_KEY"
|
||||
./scripts/ci.sh --deploy ${LIBREPAGES_DEPLOY_SECRET} librepages
|
||||
./scripts/ci.sh --clean
|
||||
./scripts/ci.sh --deploy librepages dist "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>" ${LIBREPAGES_DEPLOY_SECRET} librepages
|
||||
|
||||
lint: ## Lint codebase
|
||||
cargo fmt -v --all -- --emit files
|
||||
|
|
|
@ -89,6 +89,7 @@ write_to_branch() {
|
|||
git switch $1
|
||||
fi
|
||||
|
||||
cd ..
|
||||
git rm -rf .
|
||||
/bin/rm -rf *
|
||||
cp -r $tmp_dir/* .
|
||||
|
@ -101,6 +102,7 @@ write_to_branch() {
|
|||
--message="new deploy: $(date --iso-8601=seconds)"
|
||||
fi
|
||||
git checkout $original_branch
|
||||
find
|
||||
}
|
||||
|
||||
# $1: Pages API secret
|
||||
|
@ -148,7 +150,9 @@ then
|
|||
help
|
||||
exit -1
|
||||
fi
|
||||
deploy $2 $3
|
||||
write_to_branch $2 $3 $4
|
||||
deploy $5 $6
|
||||
clean
|
||||
elif match_arg $1 '-h' '--help'
|
||||
then
|
||||
help
|
||||
|
|
Loading…
Reference in a new issue