forked from Hostea/website
fix: add CI environment check on make ci-deploy
parent
2a72f976c2
commit
0ee38903c7
|
@ -6,4 +6,5 @@ pipeline:
|
|||
commands:
|
||||
- make env
|
||||
- make
|
||||
- ls -lah && find scripts && cat scripts/ci.sh
|
||||
- make ci-deploy
|
||||
|
|
4
Makefile
4
Makefile
|
@ -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}>"
|
||||
|
|
Loading…
Reference in New Issue