-
Notifications
You must be signed in to change notification settings - Fork 13
43 lines (36 loc) · 1.02 KB
/
json.yaml
File metadata and controls
43 lines (36 loc) · 1.02 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
name: json
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run JSON generation.
run: |
python3 utils/scripts_json.py
git config --global user.email "docbot@github.com"
git config --global user.name "docbot"
git commit -a -m "Update metadata with new script." || true
git pull --rebase && git push || true
- name: Clean up json branch
run: |
git branch -D json || true
git checkout -b json
mkdir -p docs
mkdir -p docs/scripts
mv *.json ./docs
python3 utils/copy_js_and_assets.py
echo "scripts.drawthings.ai" > ./docs/CNAME
- name: Add and commit documentation
run: |
git add "docs/*" && git commit -m "Update docs."
- name: Push the new branch
run: |
git push --force origin json:json