Skip to content

Commit

Permalink
docs: bring alex into build process (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta authored Mar 8, 2022
1 parent e6b946a commit 2995f49
Show file tree
Hide file tree
Showing 9 changed files with 11,523 additions and 7,019 deletions.
1 change: 1 addition & 0 deletions .alexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
3 changes: 3 additions & 0 deletions .alexrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
profanitySureness: 1,
};
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
coverage/
!.alexrc.js
29 changes: 17 additions & 12 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Our Pledge

<!-- alex ignore sex sexual-->

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
Expand All @@ -17,23 +19,26 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
<!-- alex ignore just -->
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
<!-- alex ignore sexual-->

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +111,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Running Shell Commands Locally 🐚

To run test commands from within the repository, simply run your commands from the root of the repository and use `./bin/rdme` instead of `rdme` so it properly points to the command executable, like so:
To run test commands from within the repository, run your commands from the root of the repository and use `./bin/rdme` instead of `rdme` so it properly points to the command executable, like so:

```sh
./bin/rdme validate __tests__/__fixtures__/ref-oas/petstore.json
Expand All @@ -25,7 +25,7 @@ As of this writing, this is the version of `act` that is able to successfully ru
act version HEAD-9abc87b
```

Once you've installed `act`, it'll ask you what Docker image size you'd like. The standard Medium ones should work just fine. Here's what your `~/.actrc` file should look like:
Once you've installed `act`, it'll ask you what Docker image size you'd like. The standard Medium ones should do the trick. Here's what your `~/.actrc` file should look like:

```
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
Expand Down
10 changes: 5 additions & 5 deletions documentation/legacy-github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If you previously had a GitHub Workflow file set up that used this action to syn
where the `readme-oas-key` was a concatenation of the `API_KEY` (your project API key) and the `API_DEFINITION_ID` (your API definition ID), separated by a colon.

For migrating to [the `rdme`-based GitHub Action](https://docs.readme.com/docs/rdme), simply modify the step to look like this:
For migrating to [the `rdme`-based GitHub Action](https://docs.readme.com/docs/rdme), modify the step to look like this:

```yml
- uses: readmeio/rdme@RDME_VERSION
Expand All @@ -53,13 +53,13 @@ There are a few things to note:

## Legacy Docs

With [GitHub Actions](https://github.com/features/actions), it's super easy to automatically sync your OpenAPI document whenever changes occur in your GitHub repo!
With [GitHub Actions](https://github.com/features/actions), you can automatically sync your OpenAPI document whenever changes occur in your GitHub repo!

> ❗️Deprecated workflow instructions below
>
> Just as a reminder, the `readmeio/github-readme-sync` GitHub Action that's described below is now deprecated. The instructions are preserved for posterity. We strongly recommend all new and existing workflows use our newest GitHub Action: [`rdme`](https://docs.readme.com/docs/rdme)!
> As a reminder, the `readmeio/github-readme-sync` GitHub Action that's described below is now deprecated. The instructions are preserved for posterity. We strongly recommend all new and existing workflows use our newest GitHub Action: [`rdme`](https://docs.readme.com/docs/rdme)!

Just create a new file in your GitHub repository called `.github/workflows/readme-github-sync.yml` and populate it with the template below. You only fill in one parameter from the ReadMe Dashboard and you'll be good to go!
Create a new file in your GitHub repository called `.github/workflows/readme-github-sync.yml` and populate it with the template below. You only fill in one parameter from the ReadMe Dashboard and you'll be good to go!

Any subsequent commits to the `main` or `master` branch (whichever is your default branch—you can also specify any GitHub event of your choice—see [GitHub's docs](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on) for more info) will automatically trigger the sync process and upload your specified OpenAPI file to ReadMe.

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

### Migrating Existing APIs to GitHub Sync

If you want to migrate APIs that are already synced into ReadMe via another mechanism, it's super easy! The value for `readme-oas-key` is your [ReadMe Project API Key](https://docs.readme.com/developers/docs/authentication#api-key-quick-start) and the API Specification ID (pictured below) separated by a colon (i.e. `apiKey:apiSpecId`).
You can also migrate APIs that are already synced into ReadMe via another mechanism. The value for `readme-oas-key` is your [ReadMe Project API Key](https://docs.readme.com/developers/docs/authentication#api-key-quick-start) and the API Specification ID (pictured below) separated by a colon (i.e. `apiKey:apiSpecId`).

![](https://files.readme.io/9a89ed3-id.png)

Expand Down
6 changes: 3 additions & 3 deletions documentation/rdme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can also specify several other page attributes in your YAML front matter, su

#### Dry Run Mode

If you're setting up new docs or if you're just generally unsure if you've set up your page attributes correctly, the `docs` command has a dry run mode. This will allow you preview the changes without actually creating/updating any docs in ReadMe, which can be extremely useful for initial setup (oh, and we have [comprehensive debugging options](#troubleshooting) available as well!). To enable dry run mode, use the `--dryRun` flag:
If you're setting up new docs or if you're generally unsure if you've set up your page attributes correctly, the `docs` command has a dry run mode. This will allow you preview the changes without actually creating/updating any docs in ReadMe, which can be extremely useful for initial setup (oh, and we have [comprehensive debugging options](#troubleshooting) available as well!). To enable dry run mode, use the `--dryRun` flag:

```sh
rdme docs path-to-markdown-files --version={project-version} --dryRun
Expand All @@ -72,7 +72,7 @@ The command output will indicate whether each page is being created or updated a

## GitHub Actions Usage

[GitHub Actions](https://docs.github.com/actions) makes it easy to automatically execute workflows when certain events take place in your GitHub repository (e.g. new code is merged into the default branch, a new pull request is opened, etc.).
With [GitHub Actions](https://docs.github.com/actions), you can automatically execute workflows when certain events take place in your GitHub repository (e.g. new code is merged into the default branch, a new pull request is opened, etc.).

> 📘 Keeping `rdme` up-to-date
>
Expand Down Expand Up @@ -220,7 +220,7 @@ To use a GitHub secret in your `rdme` GitHub Action, first [create a new reposit

## Usage in Other CI Environments

Since `rdme` is a command-line tool at its core, you can use `rdme` to sync your documentation from virtually any CI/CD environment that runs shell commands—[Bitbucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines/), [GitLab CI/CD](https://docs.gitlab.com/ee/ci/), you name it! You can do this by invoking `rdme` with `npx -y rdme@RDME_VERSION` in a Node.js environment. See below for a few simple examples.
Since `rdme` is a command-line tool at its core, you can use `rdme` to sync your documentation from virtually any CI/CD environment that runs shell commands—[Bitbucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines/), [GitLab CI/CD](https://docs.gitlab.com/ee/ci/), you name it! You can do this by invoking `rdme` with `npx -y rdme@RDME_VERSION` in a Node.js environment. See below for several examples.

<!-- Note: the two code blocks below must be joined, despite what VS Code's formatter tells you!-->

Expand Down
Loading

0 comments on commit 2995f49

Please sign in to comment.