fix: add CI environment check on make ci-deploy
ci/woodpecker/push/woodpecker Pipeline failed Details

pull/6/head
Aravinth Manivannan 2022-04-16 11:10:25 +05:30
parent 2a72f976c2
commit 0ee38903c7
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 5 additions and 0 deletions

View File

@ -6,4 +6,5 @@ pipeline:
commands:
- make env
- make
- ls -lah && find scripts && cat scripts/ci.sh
- make ci-deploy

View File

@ -6,6 +6,10 @@ clean: ## Clean build assets
./scripts/zola.sh clean
ci-deploy: ## Deploy from CI/CD. Only call from within CI
@if [ "${CI}" != "woodpecker" ]; \
then echo "Only call from within CI. Will re-write your local Git configuration. To override, set export CI=woodpecker"; \
exit 1; \
fi
git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL}"
git config --global user.name "${CI_COMMIT_AUTHOR}"
./scripts/zola.sh deploy pages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"