@@ -13,38 +13,48 @@ 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
2328Prepare folder for the new version (X.Y)
2429
25301 . cd to foreman directory
26311 . ` cp -r TEMPLATE X.Y `
27321 . ` 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 `
30351 . update index.html file with a link to the new page
3136
3237### Katello
3338
3439Generate API docs in a Foreman + Katello development environment:
3540
36- 1 . cd to the katello directory and checkout the relevant release branch
37- 1 . cd to the foreman directory and checkout the relevant stable branch
38- 1 . ` APIPIE_RECORD=examples bundle exec rake test `
39- 1 . ` RAILS_ENV=production FOREMAN_APIPIE_LANGS=en bundle exec rake apipie:cache `
41+ 1 . Go to https://github.com/Katello/katello/actions/workflows/ruby.yml?query=branch%3AKATELLO-X.Y
42+ 1 . Pick the latest run of the action
43+ 1 . Download the ` apidoc-* ` artifact (there might be multiple, pick any one of them)
44+
45+ You can also do this from the CLI using ` gh ` :
46+ ```
47+ gh run download --repo Katello/katello --pattern 'apidoc-*' $(gh run list --repo Katello/katello --workflow ruby.yml --branch KATELLO-X.Y --status completed --limit 1 --json databaseId --jq '.[].databaseId')
48+ ```
49+ Note: ` gh ` will automatically unzip the artifacts, so you only have to copy them.
4050
4151Prepare folder for the new version (X.Y)
4252
43- 1 . cd to the apidocs/ katello directory
53+ 1 . cd to the katello directory
44541 . ` cp -r TEMPLATE X.Y `
45551 . ` ln -snf X.Y latest `
46- 1 . ` cp -r dir/to/foreman/public/apipie-cache/apidoc/* X.Y/apidoc`
47- 1 . run cleanup script in apidocs repo: ` cleanup.sh `
56+ 1 . ` unzip -d X.Y/apidoc ~/Downloads/apidoc-<…>.zip `
57+ 1 . run cleanup script in the root of the apidocs repo: ` cleanup.sh `
48581 . update index.html file with a link to the new page
4959
5060## LICENSE
0 commit comments