Skip to content

Commit c84550f

Browse files
committed
docs: use variables
1 parent 78c05a6 commit c84550f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

documentation/legacy-github-action.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ If you previously had a GitHub Workflow file set up that used this action to syn
2626
```yml
2727
- uses: readmeio/github-readme-sync@v2
2828
with:
29-
readme-oas-key: API_KEY:API_DEFINITION_ID
29+
readme-oas-key: <<user>>:API_DEFINITION_ID
3030
oas-file-path: path/to/file.json
3131
api-version: 'v1.0.0'
3232
```
3333
34-
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.
34+
where the `readme-oas-key` was a concatenation of `<<user>>` (your project API key) and `API_DEFINITION_ID` (your API definition ID), separated by a colon.
3535

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

3838
```yml
3939
- uses: readmeio/rdme@RDME_VERSION
4040
with:
41-
rdme: openapi path/to/file.json --key=API_KEY --id=API_DEFINITION_ID
41+
rdme: openapi path/to/file.json --key=<<user>> --id=API_DEFINITION_ID
4242
```
4343

4444
There are a few things to note:

documentation/rdme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ For usage in GitHub Actions, create [a new GitHub Workflow file](https://docs.gi
9292
The command syntax in GitHub Actions is functionally equivalent to the CLI. For example, take the following CLI command:
9393
9494
```sh
95-
rdme openapi [path-to-file.json] --key=API_KEY --id=API_DEFINITION_ID
95+
rdme openapi [path-to-file.json] --key=<<user>> --id=API_DEFINITION_ID
9696
```
9797

9898
To execute this command via GitHub Actions, the step would look like this:
9999

100100
```yml
101101
- uses: readmeio/rdme@RDME_VERSION
102102
with:
103-
rdme: openapi [path-to-file.json] --key=API_KEY --id=API_DEFINITION_ID
103+
rdme: openapi [path-to-file.json] --key=<<user>> --id=API_DEFINITION_ID
104104
```
105105
106106
We'll dive into several full GitHub Workflow file examples below!
@@ -135,7 +135,7 @@ You've successfully updated an OpenAPI file on your ReadMe project!
135135
136136
To update your OpenAPI or Swagger definition, run the following:
137137
138-
rdme openapi FILE --key=API_KEY --id=API_DEFINITION_ID
138+
rdme openapi FILE --key=<<user>> --id=API_DEFINITION_ID
139139
```
140140

141141
</details>
@@ -164,7 +164,7 @@ jobs:
164164
# Docs: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions
165165
uses: readmeio/rdme@RDME_VERSION
166166
with:
167-
rdme: openapi [path-to-file.json] --key=API_KEY --id=API_DEFINITION_ID
167+
rdme: openapi [path-to-file.json] --key=<<user>> --id=API_DEFINITION_ID
168168
```
169169
170170
In the example above, every push to the `main` branch will check out your repository's contents and sync the OpenAPI file located at `./path-to-file.json` with your ReadMe project.
@@ -201,7 +201,7 @@ jobs:
201201
# Docs: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions
202202
uses: readmeio/rdme@RDME_VERSION
203203
with:
204-
rdme: docs ./documentation --key=API_KEY --version=2.0
204+
rdme: docs ./documentation --key=<<user>> --version=2.0
205205
```
206206
207207
In the example above, every push to the `main` branch will check out your repository's contents and sync the contents of the `documentation` directory with your ReadMe project.
@@ -234,7 +234,7 @@ pipelines:
234234
default:
235235
- step:
236236
script:
237-
- npx -y rdme@RDME_VERSION openapi [path-to-file.json] --key=API_KEY --id=API_DEFINITION_ID
237+
- npx -y rdme@RDME_VERSION openapi [path-to-file.json] --key=<<user>> --id=API_DEFINITION_ID
238238
```
239239
```yml GitLab CI (rdme-sync.gitlab-ci.yml)
240240
# Official framework image. Look for the different tagged releases at:
@@ -243,7 +243,7 @@ image: node:NODE_VERSION
243243
244244
sync-via-rdme:
245245
script:
246-
- npx -y rdme@RDME_VERSION openapi [path-to-file.json] --key=API_KEY --id=API_DEFINITION_ID
246+
- npx -y rdme@RDME_VERSION openapi [path-to-file.json] --key=<<user>> --id=API_DEFINITION_ID
247247
```
248248

249249
## Troubleshooting

0 commit comments

Comments
 (0)