Commit Graph

47 Commits

Author SHA1 Message Date
Matt Wang a812b37fcd Add CI for github-pages gem builds (#1164)
This is a small PR that:

- adds a `fixtures/Gemfile-github-pages`, the minimum gemfile necessary to build the site
- adds a new Actions workflow to build the site with that gemfile

In the future, this should prevent issues like #1074, where we push a change that passes the `jekyll` CI but fails to build on `github-pages` (and its dependencies - which in this case, was an older version of ruby sass).

(to be honest - not super happy with the code duplication, but I also think we'll have different build matrices for the different versions, so I'm fine with this for now)

Part of (but does not close) #1145.
2023-02-14 10:07:00 -08:00
Flo 975aec0791 ci: Add workflow for updating jekyll-anchor-headings automatically (#1075) 2023-01-23 23:08:41 +01:00
Matthew Wang 91c4b7e3d1 update Ruby version for publish action 2023-01-07 17:46:15 -08:00
Matt Wang e26bdd366b deploy: use GitHub Actions Pages workflow (#934)
This PR adds a `deploy.yml` to match [what's in our template repository](https://github.com/just-the-docs/just-the-docs-tests). I think it would be a great idea for us to match parity, especially:

- so that it's easier for us to help users & debug
- so that if we move to Jekyll 4 (likely soon), the transition is seamless
- so that we can explore adding custom items to the build step

Before merging this, we'll also need to change the source of the Pages deploy to actions (from the current branch deploy).
2022-12-21 13:34:01 -08:00
Matt Wang 002387bc65 ci: remove jekyll/jekyll container (#1072)
tl;dr: 

- replaces `jekyll/jekyll` with actions-native container
- changes Jekyll version targets to be explicit: `[3.9, 4.3]`
- fixes CI bug from today

I've **temporarily changed the branch protection rules** so we can merge this PR in.

## Motivations

A handful of motivations for me doing this:

- immediately: in writing #1071, I noticed that our CI is broken; this is due to an issue with the `jekyll/jekyll` container (see below)
- generally: I would like to make our CI as close to what our users would be using; I think the vast majority of our users use pages or actions, rather than the container itself
- nit: building `3.8.5` is *really slow* (takes ~ 3 minutes), and now each matrix strategy takes ~ 30 seconds with no cache!

More on each of those points now!

### Immediate Problem: `sass-embedded`

Starting today, CI fails on `main`. #1071 has one example ([CI log](https://github.com/just-the-docs/just-the-docs/actions/runs/3752287338/jobs/6374267086)), and I was able to repro this on a whitespace change with the `README`.

Several notes:

- building locally, with pages, or with Netlify does not fail; for example, the deploy preview for #1071 still works
- the error has to do with native extensions (of which `sass-embedded` is one of them) not being built properly for musl c linux; changing the pinned version of `sass-embedded` to a previous version does *not* resolve this problem
- it's not transparent what has changed: the `jekyll/jekyll` image itself has not been updated in over a month, but, something in the container (which was not pinned) must have changed and forced an error with compilation

Given that *our users* won't encounter this problem, this reads easily as a CI problem to me - we should resolve our pipeline (and not change user code/artifacts).

### Bigger Picture: `jekyll/jekyll`

Disclaimer: I have never really liked that we use `jekyll/jekyll` as part of our CI pipeline. Let me outline why and why I think this change is a good idea.

Broadly, our CI should closely match how our users use just the docs. After fielding support requests, looking at our big players, etc., I think the most common deployment methods are:

1. using native GitHub Pages. Recently, [GitHub has moved this to use GitHub Actions and their containers](https://github.blog/2022-08-10-github-pages-now-uses-actions-by-default)
2. using GitHub Actions explicitly, like what's provided in our template
3. "out-of-the-box" CD from providers like Netlify, Vercel, or Fly

In contrast, I have met few users using the `jekyll/jekyll` or `jekyll/builder` containers; of course, this is still anecdotal.

Thus, I think our CI should match the common denominator in the vast majority of our user base, which is *not* using the community container, but instead a standard linux container + bolting on Ruby tooling. Given that GitHub Pages is likely our biggest userbase, I think we should match it - which means, using Actions-specific containers (what's in this PR).

Furthermore, I think it's more likely that a user who wants a container is more knowledgeable about deployment and can resolve problems not caught by CI by themselves and/or submit an issue to GitHub, so switching off of this is fine; now, our CI will better match users who are less familiar with CD (and are likely to just use Pages out of the box).

I also will point out that `jekyll/jekyll` is **not a first-party container**, even though the namespace makes it seem like it is; it's maintained by [envygeeks](https://github.com/envygeeks/jekyll-docker). While this is very kind of them, it adds an external dependency that I would prefer to avoid.

### Build Time and `3.8.5`

This is short, but `3.8.5` isn't the latest `3` release; it's not even the latest minor patch. Since it's a "stale" container, pulling it takes a really long time (upwards of 3 minutes).

Bumping to the latest minor shouldn't affect downstream users, and has faster CI for us - which means quicker dev turnaround :)
2022-12-21 13:16:27 -08:00
Matt Wang b050b13d01 bump JS CI Node version to 18 (#1066)
Node 18 has been stable for a while, so I feel comfortable making this switch; should be no downstream impact other than speed!
2022-12-18 12:12:10 -08:00
Matt Wang 2049ebc394 consolidate CI files, updates Ruby and Node versions (#820)
This is a PR with three key changes:

1. Consolidate two identical CI files, `ci.yml` and `ci-master.yml` into one file
2. Consolidate two almost-identical jobs (`jekyll-build-*`) into one job with a strategy matrix
3. Update various dependencies/platforms
    * Node: `12.x` -> `16.x` (only in CI); `12.x` has been EOL for a while
    * Ruby: `2.6` -> `2.7`; `2.6` just reached EOL
    * `actions/checkout` -> `v2` -> `v3`
    * switches `jekyll/builder` to `jekyll/jekyll`, since we don't actually use any of the features in `jekyll/builder`

## on our CI philosophy

In working on this, I have a couple of questions:

1. We don't actually use our `Dockerfile` that we provide. Does this make sense? Should we be running CI with this instead?
2. Is there a specific reason that we're using `jekyll/jekyll`? Notably, this isn't an official package, but a community-driven one. Does it match what's used by GitHub Pages?
3. Do we have to use any docker image at all? For example, what if we just rely on the `setup-ruby` action?
    * one advantage of this is that it's much easier for us to test across multiple OS versions; we just need to have a strategy matrix for OS and do windows, macos, ubuntu, etc.
    * another advantage is that we can easily test different ruby versions in conjunction with different jekyll versions

Eventually, I would like to see us test across:

* different Jekyll versions
* different OSes
* different Ruby versions

but perhaps that might be too aggressive. Happy for any feedback on this PR or those questions!
2022-07-22 20:50:12 -07:00
Patrick Marsceill 13298d20c0 rename master -> main 2022-03-03 19:05:50 +00:00
Patrick Marsceill e842498637 Update publish-gem.yml 2020-10-14 13:23:05 -04:00
Patrick Marsceill 7f5ebee9b8 Delete publish.yml 2020-10-14 13:22:34 -04:00
Patrick Marsceill 4ab61105b9 Create publish-gem.yml 2020-10-14 13:17:51 -04:00
Patrick Marsceill 171ff71a2b Update ci.yml 2020-06-25 14:23:27 -04:00
Patrick Marsceill 16c18c1020 Fix bundle exec in CI 2020-06-23 11:56:15 -04:00
Patrick Marsceill b31355691f Fix rake command in ci 2020-06-23 11:46:30 -04:00
Patrick Marsceill 3eaa0155d1 Update ci-master.yml 2020-06-23 11:19:38 -04:00
Patrick Marsceill 6c4d47cae4 Bundle errors in ci 2020-06-23 11:09:40 -04:00
Patrick Marsceill 5fbfe09ce9 Update ci.yml 2020-05-21 14:05:17 -04:00
Patrick Marsceill 439d1d6769 Update ci.yml 2020-05-21 14:00:30 -04:00
Patrick Marsceill ddf0095a3e Update ci.yml 2020-05-21 14:00:12 -04:00
Patrick Marsceill 2d9b17070a Update ci.yml 2020-05-21 13:56:06 -04:00
Patrick Marsceill 992b38f7de Update ci.yml
Permissioning
2020-05-21 13:51:22 -04:00
Patrick Marsceill 7fdf886d15 Update ci.yml
Fix CI workflow
2020-05-21 13:49:27 -04:00
Patrick Marsceill 424f9a8ee9 Update ci-master.yml 2020-04-29 14:04:03 -04:00
Patrick Marsceill 0ea28edc71 Update ci-master.yml 2020-04-27 15:00:58 -04:00
Patrick Marsceill 3dd97d29c2 Create ci-master.yml 2020-04-27 14:59:16 -04:00
Patrick Marsceill 4197c26a36 Update ci.yml 2020-04-24 11:44:00 -04:00
Patrick Marsceill cf748e7ef5 Update ci.yml 2020-04-24 11:39:50 -04:00
Patrick Marsceill ec64bc1dce Update ci.yml 2020-04-24 11:25:28 -04:00
Patrick Marsceill f3f3179644 Update ci.yml 2020-04-24 10:57:20 -04:00
Patrick Marsceill 73e658c34e Update ci.yml 2020-04-24 00:22:28 -04:00
Patrick Marsceill 3cd3fc8fe0 Update ci.yml 2020-04-24 00:20:41 -04:00
Patrick Marsceill bc04ce25e6 Update ci.yml 2020-04-24 00:11:14 -04:00
Patrick Marsceill 1819d29c5b Update ci.yml 2020-04-23 22:55:09 -04:00
Patrick Marsceill 15674dae97 Update ci.yml 2020-04-23 22:50:37 -04:00
Patrick Marsceill a11eaff97e Update ci.yml 2020-04-23 21:48:44 -04:00
Patrick Marsceill 0ff319b2ba Update ci.yml 2020-04-23 17:23:50 -04:00
Patrick Marsceill e0032e07a5 Update ci.yml 2020-04-23 17:14:09 -04:00
Patrick Marsceill eb6bba7fda Update ci.yml 2020-04-23 17:07:03 -04:00
Patrick Marsceill fd50bb31a3 Update ci.yml 2020-04-23 16:16:43 -04:00
Patrick Marsceill db2b790a69 Update ci.yml 2020-04-23 16:13:09 -04:00
Patrick Marsceill 48b1ab47b6 Update ci.yml 2020-04-23 16:12:44 -04:00
Patrick Marsceill 3c584e2d8a Merge pull request #218 from tiaitsch85/patch-1
bugfix in search.rake
2020-04-23 16:03:11 -04:00
Patrick Marsceill 81aad708f3 Update ci.yml 2020-04-23 16:01:12 -04:00
Patrick Marsceill 4a209f7f80 Update ci.yml 2020-04-23 15:29:33 -04:00
Patrick Marsceill e5f53a8bfd Update ci.yml 2020-04-23 15:13:29 -04:00
Patrick Marsceill 14a3ff5fc8 Add publishing workflow (#172)
Publish to RubyGems and GPR on release
2019-08-09 22:33:42 -04:00
Patrick Marsceill 529c789739 upgrade-to-new-actions (#170)
Added GH Actions CI and removed Travis.
2019-08-09 14:55:53 -04:00