-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.18 KB
/
processor.yml
File metadata and controls
48 lines (39 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Process OpenAPI Files
on:
push:
branches:
- main
- dev
workflow_dispatch: # Allows the action to be triggered manually
jobs:
process_openapi_files:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq nodejs npm
- name: Install Mintlify Scrape
run: npm install @mintlify/scraping@latest -g
- name: Add servers if required
run: bash ./scripts/add_servers.sh
- name: Run the OpenAPI script
run: |
chmod +x ./scripts/process_mint.sh
./scripts/process_mint.sh
- name: Mint output
run: |
echo "The JSON array output from the script is: $mint_output"
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "Update mint.json with new OpenAPI data"
git push origin main
fi