Skip to content

Commit 695e82b

Browse files
committed
use the GHA built apidoc for foreman
1 parent bde270b commit 695e82b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,25 @@ Follow these steps to add a new version:
1313

1414
### Foreman
1515

16-
Generate API docs in Foreman:
16+
Fetch API docs for Foreman:
1717

18-
1. cd to foreman directory and checkout the relevant stable branch
19-
1. disable any plugins installed locally
20-
1. `APIPIE_RECORD=examples bundle exec rake test`
21-
1. `FOREMAN_APIPIE_LANGS=en bundle exec rake apipie:cache`
18+
1. Go to https://github.com/theforeman/foreman/actions/workflows/foreman.yml?query=branch%3AX.Y-stable
19+
1. Pick the latest run of the action
20+
1. Download the `apidoc-*` artifact (there might be multiple, pick any one of them)
21+
22+
You can also do this from the CLI using `gh`:
23+
```
24+
gh run download --repo theforeman/foreman --pattern 'apidoc-*' $(gh run list --repo theforeman/foreman --workflow foreman.yml --branch X.Y-stable --status completed --limit 1 --json databaseId --jq '.[].databaseId')
25+
```
26+
Note: `gh` will automatically unzip the artifacts, so you only have to copy them.
2227

2328
Prepare folder for the new version (X.Y)
2429

2530
1. cd to foreman directory
2631
1. `cp -r TEMPLATE X.Y`
2732
1. `ln -snf X.Y latest`
28-
1. `cp -r dir/to/foreman/public/apipie-cache/apidoc/* X.Y/apidoc`
29-
1. run cleanup script in apidocs repo: `cleanup.sh`
33+
1. `unzip -d X.Y/apidoc ~/Downloads/apidoc-<…>.zip`
34+
1. run cleanup script in the root of the apidocs repo: `cleanup.sh`
3035
1. update index.html file with a link to the new page
3136

3237
### Katello

0 commit comments

Comments
 (0)