-
Notifications
You must be signed in to change notification settings - Fork 98
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 automatic deployment preview of PRs when changing the site #660
Conversation
netlify.toml
Outdated
@@ -0,0 +1,7 @@ | |||
[build] | |||
command = "./.netlify.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it also run make
target so we can put contents of .netlifty.sh
into the Makefile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Half of them yes, but these:
if ! git config remote.origin.url &> /dev/null; then
git remote add -f -t gh-pages origin https://github.com/k8gb-io/k8gb
fi
git fetch origin gh-pages:gh-pages
git checkout gh-pages
must be done on the ref representing the PR which is checked out by default. If I split the commands into those that must be present in the netlify.toml
on a pr branch and those that can be stored in the gh-pages
' Makefile, I'd end up basically w/ the two original PRs, lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original PR was using Makefile on gh-pages
, meanwhile I suggest to use standard Makefile at https://github.com/k8gb-io/k8gb/blob/master/Makefile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got ya, yes, Netlify env. can run make targets... if we put the content of the bash script to the main Makefile (that 1 on the master's branch), that should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done using the Makefile target @ master
2a7a1e7
to
37dbde8
Compare
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
37dbde8
to
9c23e96
Compare
This is basically #657 + #658 combined to just one (no need to have a makefile target on the gh-pages branch if it's done in the bash script)
Signed-off-by: Jirka Kremser jiri.kremser@gmail.com