1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Thomas Heartman
1ca918295a
docs: generate docs daily (#3067)
## What

This change fixes the `generate-docs` workflow, so that they'll run
daily as a cron job. The `schedule` property had been erroneously listed
as a sub-property of the `workflow_dispatch` property.

## Why

The way the docs are set up at the moment, they source a lot of their
content from external repos. As it stands, we don't listen for update
events in all of those external dependencies, so we don't know when they
update. We do still want the docs to be reasonably fresh, though.

So to achieve this, we can run this workflow once a day to make sure
that no docs are more than 24 hours old.
2023-02-08 10:30:00 +00:00
Thomas Heartman
2d04bd9ea2
Add OpenAPI docs (#1391) (#2066)
## What

This PR (finally 🎉) adds generated OpenAPI docs to the official Unleash documentation. In addition to generating docs when things get merged to main, it also pushes new doc updates every day at 12:00 AM (cron `@daily`).

## Why

Now that we have OpenAPI'd all the things, we can finally start using it. This will allow us to remove hand-written api docs from the documentation and should make sure everything is always kept up to date.

### Generating from us-hosted (Unleash enterprise)

Unleash has several different versions (open source, pro, enterprise). The versions do not necessarily have the exact same api surface. In fact, the enterprise version has a few endpoints that open source does not.

Because we want to have _all_ endpoints listed in the documentation we need to generated the docs from an enterprise spec. Which brings us into the next point:

### The need for scheduled jobs

Regarding the daily scheduled tasks to update the documentation: why do we need that?

The docs are generated from the tip of the main branch. For most of the docs, this is good and something that we want. However, because the OpenAPI docs are generated from the enterprise edition, it _will not be in sync_ with the open source main branch.

Also, we probably do not want the docs to list the current bleeding edge api changes. Instead, we should prefer to use the latest enterprise release (roughly). However, because we don't get notified when this version is released and deployed, we'll instead run the API generation on a daily cadence.

This isn't the perfect solution, but it's simple and gets us 80% of the way there. More intricate solutions can be set up later.

## How

-   By adding a scheduled workflow to the generate docs config.
-   By adding .gitignore entries for the generated files

There's also some minor changes in styling etc.

## Dependencies

This is dependent on the changes introduced in #2062 having propagated to the enterprise release, which will probably not be for another week or so.

## Discussion

What should the API reference docs url be? I've set it to be `/reference/api/unleash/*` for now, but I'm on the fence about whether it should be `apis` or `api` in there. I also want to get the proxy and other APIs in there as we grow.

-------

## Commits

* docs: style openapi operation buttons

* docs: minor operation badge adjustments

* docs: use permalink to css snippet i copied

* docs: ignore files related to openapi generation

* docs: re-enable openapi docs

* Docs(#1391): prep for integration

* docs(#1391): run docs generation daily

* docs(#1391): add generation step to doc prs too

* docs(#1391): use the US hosted instance to generate docs

* docs(#1391): move doc generation into build command

* docs(#1391): use `/reference/api/*` instead of `/reference/apis/*`
2022-09-19 14:50:24 +02:00
renovate[bot]
19db5bb857
chore(deps): update actions/checkout action to v3 (#1407)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-06 21:43:00 +02:00
Thomas Heartman
69c29a6cd8 chore: new doc env vars to doc workflows 2022-03-02 12:31:06 +01:00
Thomas Heartman
14081c014e chore(workflows): update with new branch names 2021-12-23 14:12:19 +01:00
Ivar Conradi Østhus
ffec4f6342 fix: rename websitev2 to website 2021-10-26 11:25:19 +02:00
Ivar Conradi Østhus
c9a2b3d549
fix: set DEPLOYMENT_BRANCH for docusaurus 2021-09-02 14:36:18 +02:00
Christopher Kolstad
296804c147
fix: only generate docs if websitev2 subfolders are changed 2021-06-04 11:19:22 +02:00
Christopher Kolstad
406f0554cf
Docusaurusv2 (#864)
feat: Upgraded to Docusaurus v2

closes: #771
2021-06-04 11:17:15 +02:00
Ivar Conradi Østhus
9e48b5a2f4 fix: Replace travis with GitHub Actions
closes #656
2020-11-24 12:46:55 +01:00