-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (62 loc) · 1.96 KB
/
arkdoc.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
name: Update ArkDoc documentation
on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout website
uses: actions/checkout@v2
- name: Checkout ArkDoc
uses: actions/checkout@v2
with:
repository: ArkScript-lang/ArkDoc
path: './arkdoc'
ref: 'v0.2.2'
- name: Checkout std
uses: actions/checkout@v2
with:
repository: ArkScript-lang/std
path: './std-latest'
- name: Checkout ArkScript
uses: actions/checkout@v2
with:
repository: ArkScript-lang/Ark
path: './ark-latest'
ref: 'master'
# so that we can fetch tags
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Pip install
run: |
cd arkdoc/
pip install -r requirements.txt
- name: Generate documentation
shell: bash
run: |
ark_version=$(cd ark-latest; git describe --tags)
echo "New ArkScript tag: ${ark_version}"
# run arkdoc
cd arkdoc
export ARKDOC_LOGLEVEL=DEBUG
python -m arkdoc $ark_version ../std-latest/ ../ark-latest/src/arkreactor/Builtins/ --html std --root /std || exit 1
cd ..
cp -r arkdoc/std/ ./
# update version
sed "s/let version = "'"'".\+"'"'"/let version = "'"'"${ark_version}"'"'"/g" ./std/index.html > temp_index.html
rm ./std/index.html
mv temp_index.html ./std/index.html
- name: Commit
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'master'
commit-message: 'Updating ArkScript std documentation'
force-add: 'true'
files: ./std/
name: Alexandre Plateau through GitHub Action
email: [email protected]