-
Notifications
You must be signed in to change notification settings - Fork 158
68 lines (52 loc) · 1.68 KB
/
generate_schema.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Generate OpenAPI Schemas from Atproto Lexicons
on:
schedule:
- cron: "0 0 * * *" # once a day
jobs:
generate_openapi_schema:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Cache dependencies
run: deno cache ./atproto-openapi-types/main.ts
- name: Get latest copy of bluesky-social/atproto lexicons
run: ./atproto-openapi-types/scripts/get-lexicons.sh
- name: Convert lexicons to OpenAPI spec
run: deno task run
- name: Commit OpenAPI spec updates
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: atproto-openapi-types/spec/api.json updated
file_pattern: atproto-openapi-types/lexicons atproto-openapi-types/spec/api.json
- name: Wait for 1 minute
run: sleep 60
convert_to_mdx:
runs-on: ubuntu-latest
needs: generate_openapi_schema
permissions:
contents: write
steps:
- name: Checkout the latest commit
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Regenerate Docusaurus API Docs
run: npm run clear-and-gen-api-docs
- name: Commit MDX updates
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: MDX documentation updated
file_pattern: ./docs/api