Skip to content

Commit

Permalink
docs: warning callouts on outdated pages (#1163)
Browse files Browse the repository at this point in the history
## 🧰 Changes

adds temporary "this is outdated" callouts to the pages we sync to our
guides, and moves those pages into their own respective `legacy/`
directory.

we'll add new docs to backfill this info (ideally with better separation
of concerns) sometime in the not-too-distant future.
  • Loading branch information
kanadgupta committed Feb 3, 2025
1 parent 93570de commit 16500dc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ jobs:
# Docs: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions
uses: readmeio/rdme@main
with:
rdme: docs ./documentation --key=${{ secrets.README_DEVELOPERS_API_KEY }} --version=${{ vars.README_DEVELOPERS_MAIN_VERSION }}
rdme: docs ./documentation/legacy/ --key=${{ secrets.README_DEVELOPERS_API_KEY }} --version=${{ vars.README_DEVELOPERS_MAIN_VERSION }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Check out `.github/workflows/docs.yml` for more info on this!
-->

> 🚧 Deprecated Guidance
>
> This example is only applicable for projects that have yet to migrate to [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored), which requires `rdme@9`. You can find more info in [our `rdme` migration guide](https://github.com/readmeio/rdme/blob/next/documentation/migration-guide.md) or by reaching out to us at [[email protected]](mailto:[email protected])
>
> We will be updating this document with our latest guidance soon. Thanks for your patience!
Do you have Markdown files stored on GitHub? With [the `rdme` GitHub Action](https://docs.readme.com/docs/rdme), you can sync them to ReadMe every time they're updated in GitHub. Let's go over how to set this up!

## "Automagical" Workflow File Generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Check out `.github/workflows/docs.yml` for more info on this!
-->

> 🚧 Deprecated Guidance
>
> This example is only applicable for projects that have yet to migrate to [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored), which requires `rdme@9`. You can find more info in [our `rdme` migration guide](https://github.com/readmeio/rdme/blob/next/documentation/migration-guide.md) or by reaching out to us at [[email protected]](mailto:[email protected])
>
> We will be updating this document with our latest guidance soon. Thanks for your patience!
Is your OpenAPI definition stored on GitHub? With [the `rdme` GitHub Action](https://docs.readme.com/docs/rdme), you can sync it to ReadMe every time it's updated in GitHub. Let's go over how to set this up!

## "Automagical" Workflow File Generation
Expand Down
File renamed without changes.
32 changes: 25 additions & 7 deletions documentation/rdme.md → documentation/legacy/rdme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ To see detailed CLI setup instructions and all available commands, check out [th

### Markdown File Setup

> 🚧 Deprecated Guidance
>
> This guidance is only applicable for projects that have yet to migrate to [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored), which requires `rdme@9`. You can find more info in [our `rdme` migration guide](https://github.com/readmeio/rdme/blob/next/documentation/migration-guide.md) or by reaching out to us at [[email protected]](mailto:[email protected])
>
> We will be updating this document with our latest guidance soon. Thanks for your patience!
> 📘 Guides, Changelog, Custom Pages... you name it!
>
> The following guidance on Markdown file setup is nearly identical for Guides (i.e. the `docs` command), Changelog (i.e. the `changelogs` command), and Custom Pages (i.e. the `custompages` command). There are a couple of small differences:
Expand Down Expand Up @@ -135,14 +141,20 @@ While there are [dozens of event options available](https://docs.github.com/acti
### Quick Start

> 🚧 Deprecated Guidance
>
> This guidance is only applicable for projects that have yet to migrate to [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored), which requires `rdme@9`. You can find more info in [our `rdme` migration guide](https://github.com/readmeio/rdme/blob/next/documentation/migration-guide.md) or by reaching out to us at [[email protected]](mailto:[email protected])
>
> We will be updating this document with our latest guidance soon. Thanks for your patience!
The fastest way to create a GitHub Actions workflow file is by doing the following:

1. Download `rdme` to your local machine (see [our setup instructions](https://github.com/readmeio/rdme#setup))
2. Open your command line at the root of your GitHub repository
3. Run the command you wish to automate on your local machine with the `--github` flag tacked on at the end. For example:

```sh
rdme openapi --github
rdme openapi validate --github
```

This will run through the `openapi` command, ask you a few quick questions, and then automatically create a fully functional GitHub Actions workflow file for you. 🪄
Expand All @@ -168,7 +180,7 @@ To use sensitive information (like your ReadMe API key) in your `rdme` GitHub Ac
```yml
- uses: readmeio/rdme@RDME_VERSION
with:
rdme: openapi [url-or-local-path-to-file] --key=${{ secrets.README_API_KEY }} --id=API_DEFINITION_ID
rdme: openapi validate [url-or-local-path-to-file] --key=${{ secrets.README_API_KEY }} --id=API_DEFINITION_ID
```
### Manually Configuring a GitHub Actions Workflow
Expand Down Expand Up @@ -209,6 +221,12 @@ The following section has links to full GitHub Actions workflow file examples.
### GitHub Actions Examples
> 🚧 Deprecated Guidance
>
> This guidance is only applicable for projects that have yet to migrate to [ReadMe Refactored](https://docs.readme.com/main/docs/welcome-to-readme-refactored), which requires `rdme@9`. You can find more info in [our `rdme` migration guide](https://github.com/readmeio/rdme/blob/next/documentation/migration-guide.md) or by reaching out to us at [[email protected]](mailto:[email protected])
>
> We will be updating this document with our latest guidance soon. Thanks for your patience!

Want to start syncing? We have several example workflow files available:

- [Syncing an OpenAPI definition](https://docs.readme.com/docs/github-actions-openapi-example)
Expand All @@ -233,7 +251,7 @@ pipelines:
default:
- step:
script:
- npx rdme@RDME_VERSION openapi [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
- npx rdme@RDME_VERSION openapi validate [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
```
```yml CircleCI (.circleci/config.yml)
version: 2.1
Expand All @@ -245,7 +263,7 @@ jobs:
- image: node:NODE_VERSION
steps:
- run:
command: npx rdme@RDME_VERSION openapi [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
command: npx rdme@RDME_VERSION openapi validate [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
```
```yml GitLab CI (rdme-sync.gitlab-ci.yml)
# Official framework image. Look for the different tagged releases at:
Expand All @@ -254,15 +272,15 @@ image: node:NODE_VERSION
sync-via-rdme:
script:
- npx rdme@RDME_VERSION openapi [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
- npx rdme@RDME_VERSION openapi validate [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
```
```yml Travis CI (.travis.yml)
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#specifying-nodejs-versions
language: node_js
node_js:
- NODE_VERSION
script: npx rdme@RDME_VERSION openapi [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
script: npx rdme@RDME_VERSION openapi validate [url-or-local-path-to-file] --key=$README_API_KEY --id=API_DEFINITION_ID
```
<!-- prettier-ignore-end -->

Expand All @@ -288,7 +306,7 @@ If you're working with the `docs` command specifically, we recommend using [dry
If you're troubleshooting issues with the CLI (or in some non-GitHub Actions environment), you can use the `DEBUG` environmental variable to print helpful debugging info to the console:

```sh
DEBUG=rdme* rdme openapi [url-or-local-path-to-file]
DEBUG=rdme* rdme openapi validate [url-or-local-path-to-file]
```

Note that this should only be used for development/debugging purposes and should not be enabled in production environments.
Expand Down

0 comments on commit 16500dc

Please sign in to comment.