Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Makefile target for building the website for netlify pr preview #788

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -53,3 +53,12 @@ else
@echo "Local generation requires a GitHub PAT token with the 'public_repo' scope (https://github.com/settings/tokens/new)."
@echo "The token should be assigned to the JEKYLL_GITHUB_TOKEN environment variable."
endif

# Used by netlify to prepare the PR preview
.PHONY: website
website:
@if [ "$(CI)" = "true" ]; then\
mv CNAME EMANC ;\
bundle install ;\
bundle exec jekyll build ;\
fi
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build]
command = "make website"
publish = "_site/"