-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (75 loc) · 2.96 KB
/
gen_reference.yml
File metadata and controls
86 lines (75 loc) · 2.96 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
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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Setup python 3.x
- name: Setup Python
uses: actions/setup-python@v2.2.2
- name: Setup Godot
# You may pin to the exact commit or the version.
# uses: Vitorgus/Setup-Godot@3d0ca0439ee22febb8fcc97fad12e8ac1329144e
uses: Vitorgus/Setup-Godot@v1.0.0
with:
# Godot version to download
godot-version: 3.3.4
# If it should also download and cache the export templates
download-templates: false
- name: Install and clone GDScript-docs-maker
run: |
python3 -m pip install gdscript_docs_maker
git clone https://github.com/GDQuest/gdscript-docs-maker.git
- name: Generate docs
run: |
cd gdscript-docs-maker/
./generate_reference .. -o ../docs
# Update velius.dev
- name: Update velius.dev
run: |
cd ..
sed -i '1s/^/---\neditLink: false\nsidebar: auto\ntitle: 'Reference'\n---\n/' VeliusEngine/docs/velius.gd.md
mv VeliusEngine/docs/velius.gd.md VeliusEngine/docs/README.md
- name: Push the updated docs
uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{ secrets.BOT_PAT }}
with:
source_file: 'docs/README.md'
destination_repo: 'Velius-Development/VeliusDocs'
destination_branch: 'master'
destination_folder: 'reference'
user_email: '${{ secrets.BOT_EMAIL }}'
user_name: '${{ secrets.BOT_NAME }}'
commit_message: 'Updated references 📚'
# Update VeliusSDK
- name: Generate VeliusSDK
run: |
python3 .github/workflows/sdk_maker/sdk_maker.py
- name: Push generated SDK
uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{ secrets.BOT_PAT }}
with:
source_file: 'velius.gd'
destination_repo: 'Velius-Development/VeliusSDK'
destination_branch: 'master'
destination_folder: 'addons'
user_email: '${{ secrets.BOT_EMAIL }}'
user_name: '${{ secrets.BOT_NAME }}'
commit_message: 'Updated SDK 🤖'