Skip to content

Commit

Permalink
Generate apis.md automatically
Browse files Browse the repository at this point in the history
Remove `apis.md` and generate it when updating the site.
Add template and apply manual changes done previously to not require to
edit it each time it's regenerated.

Signed-off-by: thc202 <thc202@gmail.com>
  • Loading branch information
thc202 committed Oct 9, 2023
1 parent 4a79268 commit 7870c67
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 40,014 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Generate apis.md
run: |
npm install
npm run build
- run: bundle exec middleman build
9 changes: 8 additions & 1 deletion .github/workflows/update-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- uses: actions/setup-node@v3
with:
node-version: '20'
- uses: actions/checkout@v3
with:
path: zap-api-docs
Expand All @@ -22,9 +25,13 @@ jobs:
persist-credentials: false
path: zaproxy.github.io
fetch-depth: 0
- name: Build API docs
- name: Generate apis.md
run: |
cd zap-api-docs
npm install
npm run build
- name: Build API docs
run: |
gem install bundler
bundle install
bundle exec middleman build --clean
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ doc/
# JS
node_modules/
/dist/

# Generated
/source/includes/apis.md
Loading

0 comments on commit 7870c67

Please sign in to comment.