Commit Graph

42 Commits

Author SHA1 Message Date
Thaddee Tyl
0ae322b524 Commit index.html and _next on gh-page deployment
Fixes #1458.
2018-02-25 01:14:26 +01:00
Thaddee Tyl
36a22549e5 Add build folder for gh-pages deployment
Fixes #1458.
2018-02-25 01:14:26 +01:00
Paul Melnikow
2be271c22b Frontend: Allow BASE_URL to be unset (#1306)
- Do not use bogus `'undefined'` as base URI
2017-12-01 16:34:31 -05:00
Paul Melnikow
c5e31b5de1 Fix frontend deploy and Heroku staging (#1288)
- Heroku reads the Node version from package.json. We're about to upgrade to Node 8 so this change to `engines` is only pre-emptive. It won't have any effect on the production servers.
- The production deploy scripts were missing the frontend files. This fixes that.
- This modifies the build setup to allow `BASE_URL=/`, which makes all requests relative to the page itself. That simplifies deploying the "debugging" frontend to the production servers, and makes it easy to host the frontend on Heroku.
2017-11-29 17:59:01 -05:00
Paul Melnikow
4b5bf03fea Rewrite frontend in React (#1273)
I rewrote the frontend in React using a module bundler. It's matched feature-for-feature with the current frontend, with only slight changes in the styling. I did not fuss about making the styling identical; the badge popup looks particularly different.

This makes the front end much easier to develop. I'm really looking forward to implementing #701, to which this paves the way.

This makes light use of Next.js, which provides webpack config and dev/build tooling. We’ll probably replace it with create-react-app or our own webpack setup because unfortunately it comes with a lot of runtime overhead (the build is 400k).

Let’s open new issues for bugs and features, and track other follow-ups here: https://github.com/badges/shields/projects/1
2017-11-28 11:34:17 -05:00
Paul Melnikow
a2f5cbb03a Push frontend to production servers at /index.html (#1222)
* Push frontend to production servers at /index.html

Local production builds will use local server instead of img.shields.io, to support local testing

* Restore https://img.shields.io to example URIs
2017-11-01 20:48:01 +01:00
Paul Melnikow
91eaa2958c Move gh-badges CLI into lib/ 2017-10-30 21:46:50 -04:00
Paul Melnikow
bde4d925f2 Retire try.html and create new dev + prod builds (#1194)
- Followup from #1163
- Retire try.html
- Separate build config for dev and production
    - Move config for badge examples into the JS build
- Move the prod transform into npm scripts
    - In the future this could be handled using a bundler plugin
- make website builds production build as before
- Run the production build in CI to make sure it’s working
- Build the frontend on Heroku
2017-10-28 14:02:45 -04:00
Paul Melnikow
ef86288eab Fix production build for quoting style of generated frontend
The quoting style chnaged in b411f08.

This is to fix the production build, in which image links were all broken because they pointed to shields.io instead of img.shields.io.
2017-10-22 09:39:09 -04:00
Paul Melnikow
b411f08ad1 Generate badge examples from data + code (#1163)
This pull request sets us up to generate the badge examples dynamically from data and code.

Right now, try.html is still checked in, mostly for the benefit of reading this diff, though it should be removed on the next pass to avoid unnecessary complexity at merge time.
2017-10-20 17:33:12 -04:00
Paul Melnikow
cca46b7e94 Generate index.html only on gh-pages when deploying
- Build index.html at deploy time
- Update corresponding documentation references
- Since index.html is untracked, git add needs -f
- Clarify gh-pages generated commit message
- Improve Makefile dependencies related to website generation

As discussed in #936, tracking the index.html causes makes PRs longer / noisier
and causes extra merge conflicts. More importantly, it causes contributors to
inadvertently edit the wrong file, which causes extra work (#949) or
contributions to be lost (#898).

Since there's no need for index.html in development (everything uses try.html) a
logical solution is to generate and commit the index.html at deploy time.

Recording compiled or generated files in a deploy commit is a reasonable
practice for git-based deploys (Heroku, gh-pages, and others).

The old version of this was slightly "unsafe" for my taste, in that it depended
on the local copy of gh-pages (if it existed) and master. The new version just
replaces gh-pages with master + the new commit.

Closes #936.

Fixes #954 (the PR).
2017-04-25 23:40:08 +02:00
Thaddee Tyl
982bcf62aa Add s2 server
Part of #868.
2017-02-13 00:54:23 +01:00
Thaddee Tyl
7c8b0e3d32 Contain all private files in private/ 2017-02-05 16:24:35 +01:00
Thaddee Tyl
3cf2a3ae52 make website: support both Linux and macOS 2016-08-13 20:54:32 +02:00
Thaddee Tyl
bfcdc4af1d make website: use macOS' sed -E 2016-08-12 20:50:15 +02:00
Thaddee Tyl
89401b13af make website: output newline on macOS' sed 2016-08-09 19:11:01 +02:00
Thaddee Tyl
08d3be0a28 website: detect query string when adding HTTP caching
Related to 89affa49fe.
Closes #639, #691, #697.
2016-04-26 09:46:50 +02:00
Thaddee Tyl
89affa49fe website: use heavy HTTP caching
This will hopefully help a bit for #633.
2016-04-10 13:43:00 +02:00
Thaddee Tyl
d1a962152d Support the new server 2016-02-08 20:27:17 +01:00
Thaddee Tyl
7443648063 Remove dead make entries 2015-11-07 17:55:33 +01:00
Thaddee Tyl
3bb0d92b2c Deploy vs. Deploy Heroku 2015-09-12 15:34:04 +02:00
Thaddee Tyl
f204d4a21e Prepare new server deploy script 2015-07-07 09:26:23 +02:00
Thaddee Tyl
a3f36176e0 Uppercase the "generated" warning in index.html 2015-03-24 09:02:03 +01:00
Thaddee Tyl
9d8b3cfc1e Change ajax domain request. 2015-01-08 19:22:31 +01:00
Thaddee Tyl
abbd893e2e use https for images and in the dialog
Closes #329
2014-12-19 15:57:49 +01:00
Thaddee Tyl
9cba12c11b website: use https on badge examples
Closes #329
2014-12-19 15:40:01 +01:00
Thaddee Tyl
ed68a39956 fix make favicon 2014-11-21 23:54:36 +01:00
Thaddee Tyl
f45ba3f8d1 make test
See #269
2014-09-27 23:16:45 +02:00
Thaddee Tyl
32435e8fc0 website: Mention that it is generated. 2014-08-21 22:50:13 +02:00
Thaddee Tyl
2f12470c2d Use GitHub OAuth apps to increase rate limits. 2014-06-02 23:28:54 +02:00
Thaddee Tyl
00caf7bb12 Force a gh-pages update. 2014-05-30 21:17:45 +02:00
Thaddee Tyl
5685238956 Using Redis to store analytics on Heroku. 2014-04-07 23:29:30 +00:00
Thaddee Tyl
2d99c5b232 [deploy] force add the font file. 2014-03-04 13:57:43 +01:00
Thaddee Tyl
300b0688c2 [website] Make the widget work on localhost. 2014-02-26 13:34:59 +01:00
Thaddee Tyl
556f2aae0c Deploy includes uploading the new website. 2014-02-26 11:17:28 +01:00
Thaddee Tyl
b0a16af913 Omit old files. 2014-02-19 13:46:27 +01:00
Thaddee Tyl
109a437d0a try.html for testing, index.html generated. 2014-02-15 22:42:25 +01:00
Thaddee Tyl
b888feb353 makefile: phony favicon. 2014-01-19 13:56:25 +01:00
Thaddee Tyl
cf8a441dcf website: favicon. 2014-01-17 15:31:29 +01:00
James Harris
cb625f018a Added support for specific Travis CI branches. 2014-01-12 16:15:56 +01:00
Thaddee Tyl
3634da8c9d make deploy: pushes master on the heroku instance. 2014-01-04 13:52:15 +01:00
Thaddee Tyl
b6e3fa7d1c Automate creation of SVG badges.
This is related to bug #2.
2014-01-02 17:53:17 +01:00