-
-
Notifications
You must be signed in to change notification settings - Fork 23
176 lines (148 loc) · 5.39 KB
/
regen.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
name: 'Regen API Docs'
on:
workflow_dispatch:
repository_dispatch:
types: [ regen-api-docs ]
jobs:
regen:
runs-on: ubuntu-latest
defaults:
run:
working-directory: titanium-docs
steps:
# third-party action that cancels previous runs
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout titanium-docs
uses: actions/checkout@v3
with:
path: titanium-docs
- name: Checkout titanium_mobile
uses: actions/checkout@v3
with:
fetch-depth: 0
path: titanium_mobile
repository: tidev/titanium_mobile
- name: Checkout ti.map
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.map
repository: tidev/ti.map
- name: Checkout ti.facebook
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.facebook
repository: tidev/ti.facebook
- name: Checkout ti.coremotion
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.coremotion
repository: tidev/ti.coremotion
- name: Checkout ti.crypto
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.crypto
repository: tidev/ti.crypto
- name: Checkout ti.urlsession
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.urlsession
repository: tidev/ti.urlsession
- name: Checkout titanium-identity
uses: actions/checkout@v3
with:
fetch-depth: 0
path: titanium-identity
repository: tidev/titanium-identity
- name: Checkout ti.playservices
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.playservices
repository: tidev/ti.playservices
- name: Checkout ti.geofence
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.geofence
repository: tidev/ti.geofence
- name: Checkout appcelerator.ble
uses: actions/checkout@v3
with:
fetch-depth: 0
path: appcelerator.ble
repository: tidev/appcelerator.ble
- name: Checkout appcelerator.bluetooth
uses: actions/checkout@v3
with:
fetch-depth: 0
path: appcelerator.bluetooth
repository: tidev/appcelerator.bluetooth
- name: Checkout appcelerator.https
uses: actions/checkout@v3
with:
fetch-depth: 0
path: appcelerator.https
repository: tidev/appcelerator.https
- name: Checkout appcelerator.encrypteddatabase
uses: actions/checkout@v3
with:
fetch-depth: 0
path: appcelerator.encrypteddatabase
repository: tidev/appcelerator.encrypteddatabase
- name: Checkout titanium-web-dialog
uses: actions/checkout@v3
with:
fetch-depth: 0
path: titanium-web-dialog
repository: tidev/titanium-web-dialog
- name: Checkout ti.barcode
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.barcode
repository: tidev/ti.barcode
- name: Checkout titanium-apple-sign-in
uses: actions/checkout@v3
with:
fetch-depth: 0
path: titanium-apple-sign-in
repository: tidev/titanium-apple-sign-in
- name: Checkout ti.nfc
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ti.nfc
repository: tidev/ti.nfc
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
if: steps.node-cache.outputs.cache-hit != 'true'
- name: Remove old API docs to generate new ones
run: npm run clean:api
- name: Generate metadata
run: npm run docs:metadata -- ../ti.map/apidoc ../ti.facebook/apidoc ../ti.coremotion/apidoc ../ti.crypto/apidoc ../ti.urlsession/apidoc ../titanium-identity/apidoc ../ti.playservices/apidoc ../ti.geofence/apidoc ../appcelerator.ble/apidoc ../appcelerator.bluetooth/apidoc ../appcelerator.https/apidoc ../appcelerator.encrypteddatabse/apidoc ../titanium-web-dialog/apidoc ../ti.barcode/apidoc ../titanium-apple-sign-in/apidoc ../ti.nfc/apidoc ../appcelerator.encrypteddatabase/apidoc
- name: Migrate docs
run: npm run docs:migrate -- ../ti.map/apidoc ../ti.facebook/apidoc ../ti.coremotion/apidoc ../ti.crypto/apidoc ../ti.urlsession/apidoc ../titanium-identity/apidoc ../ti.playservices/apidoc ../ti.geofence/apidoc ../appcelerator.ble/apidoc ../appcelerator.bluetooth/apidoc ../appcelerator.https/apidoc ../appcelerator.encrypteddatabse/apidoc ../titanium-web-dialog/apidoc ../ti.barcode/apidoc ../titanium-apple-sign-in/apidoc ../ti.nfc/apidoc ../appcelerator.encrypteddatabase/apidoc
- name: Commit changes
id: committed
uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: titanium-docs
- name: Repository Dispatch
if: steps.committed.outputs.changes_detected == 'true'
uses: peter-evans/repository-dispatch@v2
with:
event-type: deploy
token: ${{ secrets.REGEN_BUILDS_DOCS_GITHUB_TOKEN }}