Build lua_api.html in CI pipeline
This commit is contained in:
parent
62e2d0f835
commit
6929d5fd0d
@ -5,12 +5,14 @@ variables:
|
|||||||
LC_ALL: C.UTF-8
|
LC_ALL: C.UTF-8
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
- apk add python3 py3-markdown
|
||||||
- rm Gemfile.lock
|
- rm Gemfile.lock
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
interruptible: true
|
interruptible: true
|
||||||
script:
|
script:
|
||||||
|
- python3 utils/update_lua_api.py
|
||||||
- bundle exec jekyll build -d test
|
- bundle exec jekyll build -d test
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
@ -21,9 +23,8 @@ test:
|
|||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
interruptible: true
|
interruptible: true
|
||||||
before_script:
|
|
||||||
- rm Gemfile.lock
|
|
||||||
script:
|
script:
|
||||||
|
- python3 utils/update_lua_api.py
|
||||||
- bundle exec jekyll build -d public
|
- bundle exec jekyll build -d public
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import markdown, urllib2, datetime, re, string
|
import markdown, datetime, re, string
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
from urllib.request import urlopen
|
||||||
|
|
||||||
def get_key(index, li, title):
|
def get_key(index, li, title):
|
||||||
title = title.replace(" ", "-")
|
title = title.replace(" ", "-")
|
||||||
@ -28,8 +29,7 @@ def get_key(index, li, title):
|
|||||||
print("Downloading lua_api.txt...")
|
print("Downloading lua_api.txt...")
|
||||||
|
|
||||||
url = "https://raw.githubusercontent.com/minetest/minetest/master/doc/lua_api.txt"
|
url = "https://raw.githubusercontent.com/minetest/minetest/master/doc/lua_api.txt"
|
||||||
text = urllib2.urlopen(url).read()
|
text = urlopen(url).read().decode("utf-8")
|
||||||
text = unicode(text, "utf-8")
|
|
||||||
|
|
||||||
|
|
||||||
print("Pre-generation replacements...")
|
print("Pre-generation replacements...")
|
||||||
|
Loading…
Reference in New Issue
Block a user