-
Notifications
You must be signed in to change notification settings - Fork 16
37 lines (33 loc) · 1.11 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
name: CI
on:
push:
branches: master
paths: doc_classes/*
pull_request:
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/download-file-action@v1.0.3
with:
file-url: https://raw.githubusercontent.com/godotengine/godot/3.2/doc/tools/makerst.py
- name: Export XML documentation to RST and fix up for Github
run: |
mkdir .wiki
python3 ./makerst.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 }}