mathdown icon indicating copy to clipboard operation
mathdown copied to clipboard

Implement Netlify Button

Open cben opened this issue 10 years ago • 11 comments

https://devcenter.heroku.com/articles/heroku-button https://blog.openshift.com/instant-hosting-of-open-source-projects-with-github-style-ribbons/

Heroku is better for easy fork deployment due to:

  • unlimited 1 free dyno per app (vs RHcloud's 3 gears per user)
  • no size issues (so far), while on RHcloud I already had to pay a bit for quota doubling
  • fast deploy (<1 minute vs 7min)

cben avatar Feb 20 '15 01:02 cben

https://launch-shifter.rhcloud.com/

cben avatar Apr 12 '15 19:04 cben

Heroku Button won't work with submodules :-(

Heroku Button will not work with repos that have Git submodules. Heroku Button relies on the Build API and uses tarballs fetched from GitHub. GitHub does not include submodule contents when repo-content tarballs are generated.

cben avatar May 27 '15 10:05 cben

Tried the launch-shifter which IIUC is simply creates a workflow URL:

![LAUNCH ON OpenShift](https://launch-shifter.rhcloud.com/launch/LAUNCH ON.svg)

Clicking asks to login or create user. Created a new user (to check it works for a free user). Filled app name & namespace (http://mathdown1–cbensf.rhcloud.com) but left branch empty. =>

⚠ Unable to complete the requested operation. Show less

Shell command '/sbin/runuser -s /bin/sh 55c9b8900c1e66fd7f0000c0 -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c1,c430' /bin/sh -c \"
set -xe;
shopt -s dotglob;
if [ "$(find objects -type f 2>/dev/null | wc -l)" -eq "0" ]; then
  exit 0;
fi
git archive --format=tar master | (cd /var/lib/openshift/55c9b8900c1e66fd7f0000c0/app-root/runtime/repo && tar --warning=no-timestamp -xf -);
\""' returned an error. rc=1
+ shopt -s dotglob
+ '[' 3 -eq 0 ']'
+ cd /var/lib/openshift/55c9b8900c1e66fd7f0000c0/app-root/runtime/repo
+ git archive --format=tar master
+ tar --warning=no-timestamp -xf -
fatal: Not a valid object name
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

cben avatar Aug 11 '15 09:08 cben

Trying branch = gh-pages... => perhaps working but SLOW. The original page was stuck on spinner, after 4-5 min said:

Application creation is taking longer than expected. Please wait a few minutes, then refresh this page.

The app after 4 minutes was still in "building" status on dashboard (and returned 503). After 7 min, it's alive.

cben avatar Aug 11 '15 09:08 cben

"initial_git_branch: the name of your initial deployment branch. The default value is master."

![LAUNCH ON OpenShift](https://launch-shifter.rhcloud.com/launch/LAUNCH ON.svg)

cben avatar Aug 11 '15 09:08 cben

That pre-filled gh-pages successfully but deployment failed with some error (sorry, lost). Retrying after deleting mathdown1 succeeded. Then successfully launched mathdown3 (7.5min) in parallel to mathdown2, so it's not a resource limit (RHcloud should give 3 free gears).

cben avatar Aug 11 '15 10:08 cben

Closed as I can't implement Heroku button due to lack of submodule support.

cben avatar Aug 11 '15 19:08 cben

Reopening. Openshift online is currently stuck between v2 which no longer accepts signups and v3 which is time-limited preview. The (hypotetical :rofl:) hordes of contributors which want to fork Mathdown and instantly host it, have no trivial option. Heroku is an easy option with git push. Anyway I want the full Heroku Quality of Life — button, review apps(!), possibly auto-deploy from github to staging (though deploy from travis CI might make more sense).

cben avatar Sep 14 '16 22:09 cben

This is blocked on my use of submodules #115. For Heroku should first investigate submodule buildpacks: https://github.com/cben/mathdown/issues/115#issuecomment-145668433

cben avatar Sep 14 '16 22:09 cben

https://github.com/SectorLabs/heroku-buildpack-git-submodule looks promising

cben avatar Dec 18 '18 09:12 cben

As part of #172, I've moved from Heroku to Netlify. It spins up automatic preview apps for PRs. But can still add a Netlify button https://www.netlify.com/blog/2016/11/29/introducing-the-deploy-to-netlify-button/ ?

In any case, should revise README.

cben avatar Dec 17 '22 17:12 cben