fix: add CI environment check on make ci-deploy
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
parent
2a72f976c2
commit
0ee38903c7
|
@ -6,4 +6,5 @@ pipeline:
|
||||||
commands:
|
commands:
|
||||||
- make env
|
- make env
|
||||||
- make
|
- make
|
||||||
|
- ls -lah && find scripts && cat scripts/ci.sh
|
||||||
- make ci-deploy
|
- make ci-deploy
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -6,6 +6,10 @@ clean: ## Clean build assets
|
||||||
./scripts/zola.sh clean
|
./scripts/zola.sh clean
|
||||||
|
|
||||||
ci-deploy: ## Deploy from CI/CD. Only call from within CI
|
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.email "${CI_COMMIT_AUTHOR_EMAIL}"
|
||||||
git config --global user.name "${CI_COMMIT_AUTHOR}"
|
git config --global user.name "${CI_COMMIT_AUTHOR}"
|
||||||
./scripts/zola.sh deploy pages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
|
./scripts/zola.sh deploy pages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
|
||||||
|
|
Loading…
Reference in New Issue