Skip to content

refs #287: Fix docs deployment #12

refs #287: Fix docs deployment

refs #287: Fix docs deployment #12

Workflow file for this run

name: Publish updated documentation
on:
pull_request:
# push:
# tags:
# - "v*.*.*"
# - "v*.*.*-alpha*"
# - "v*.*.*-beta*"
# - "v*.*.*-rc*"
env:
PYTHON_VERSION: 3.12
GDE_TAG: godot-docs-extractor
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Install Python environment
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install MkDocs and dependencies
run: >
pip install
mkdocs==1.5.3
mkdocs-nav-weight
mkdocs-abs-rel-plugin
mkdocs-add-number-plugin
mkdocs-autolinks-plugin
mkdocs-autorefs
mkdocs-awesome-pages-plugin
mkdocs-codeinclude-plugin
mkdocs-enumerate-headings-plugin
mkdocs-exclude
mkdocs-exclude-search
mkdocs-gallery
mkdocs-gen-files
mkdocs-git-authors-plugin
mkdocs-git-committers-plugin-2
mkdocs-git-revision-date-localized-plugin
mkdocs-img2fig-plugin
mkdocs-include-markdown-plugin
mkdocs-kroki-plugin
mkdocs-literate-nav
mkdocs-localsearch
mkdocs-macros-plugin
mkdocs-markdownextradata-plugin
mkdocs-merge
mkdocs-minify-plugin
mkdocs-monorepo-plugin
mkdocs-multirepo
mkdocs-multirepo-plugin
mkdocs-no-sitemap-plugin
mkdocs-print-site-plugin
mkdocs_pymdownx_material_extras
mkdocs-safe-text-plugin
mkdocs-same-dir
mkdocs-section-index
mkdocs-simple-hooks
mkdocs-simple-plugin
mkdocs-swagger-ui-tag
mkdocs-redirects
mkdocs-versioning
mkdocs-with-confluence
mkdocstrings
mkdocs-alabaster
mkdocs-cinder
mkdocs-kpn
mkdocs-material
mkdocs-mermaid2-plugin
neoteroi-mkdocs
markdown-include
pygments
pymdown-extensions
fontawesome-markdown
- name: Find fontawesome-markdown package location and save it in an environment variable
run: echo ::set-env name=FONTAWESOME_MARKDOWN_PATH::$(pip show fontawesome-markdown | grep Location | cut -d ' ' -f 2)
- name: Patch fontawesome-markdown to support Markdown 3.4+
run: cp -f ./docs/patches/fontawesome_markdown/*.py ${{ env.FONTAWESOME_MARKDOWN_PATH }}/fontawesome_markdown/
- name: Build DocsExtractor Docker image
working-directory: ./docs
run: docker build -f Dockerfile.DocsExtractor -t ${{ env.GDE_TAG }} .
- name: Extract code reference documentation from Godot source
run: docker run -i -t ${{ env.GDE_TAG }} -v ${{ github.workspace }}:/project -v ${{ github.workspace }}/docs/src/the-engine-handbook/scripting-reference:/output
- name: Deploy to production
working-directory: ./docs
run: mkdocs gh-deploy --force --clean --verbose