-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (34 loc) · 1.24 KB
/
main.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
name: CI
on:
push:
branches: master
paths: doc_classes/*
jobs:
wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download makerst.py
uses: carlosperate/[email protected]
with:
file-url: https://raw.githubusercontent.com/godotengine/godot/4.1/doc/tools/make_rst.py
- name: Download version.py
uses: carlosperate/[email protected]
with:
file-url: https://raw.githubusercontent.com/godotengine/godot/4.1/version.py
- name: Export XML documentation to RST and fix up for Github
run: |
mkdir .wiki
python3 ./make_rst.py --output .wiki/ doc_classes/ || /bin/true
for i in .wiki/*
do
sed -i -e '1d' -e '2i*This file is automatically generated. To make changes, please edit the corresponding xml file in the doc_classes/ folder instead.*' -e 's/:ref:`\([^<]*\)<\([^>]*\)>`/`\1 <\2>`_/g' $i
done
echo "Done"
- name: Sync files to wiki
uses: kai-tub/external-repo-sync-action@v1
with:
source-directory: .wiki/
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}