enable android build in template workflow #500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: push | |
jobs: | |
docs: | |
name: build docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build docker image | |
run: docker build -t yourgame --build-arg NO_EMSDK="true" --build-arg NO_ANDROID="true" . | |
- name: run mkdocs | |
run: docker run --rm -v $(pwd):/code yourgame /bin/bash -c "cd docs && mkdocs build" | |
- name: run doxygen | |
run: docker run --rm -v $(pwd):/code yourgame /bin/bash -c "cd docs && mkdir -p _deploy/doxygen && doxygen --version && doxygen" | |
- name: initialize project | |
run: docker run --rm -v $(pwd):/code yourgame /bin/bash -c "python ./init/init.py YourGameProject --clone && zip -r docs/_deploy/YourGameProject.zip YourGameProject/" | |
- name: prepare clang-tidy | |
run: docker run --rm -v $(pwd):/code yourgame /bin/bash -c "cd quality && /bin/bash yg_cmake_lib.bash" | |
- name: run clang-tidy | |
run: docker run --rm -v $(pwd):/code yourgame /bin/bash -c "cd quality && python ./run-clang-tidy.py -config-file ../.clang-tidy -p _build -source-filter '^((?!thirdparty).)*$' > ../docs/_deploy/clang-tidy_log.txt" | |
- name: process clang-tidy log | |
run: docker run --rm -v $(pwd):/code yourgame /bin/bash -c "cd quality && python ./yg_parse_clang-tidy.py ../docs/_deploy/clang-tidy_log.txt > ../docs/_deploy/clang-tidy_results.txt" | |
- name: upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/_deploy | |
deploy: | |
name: deploy docs | |
runs-on: ubuntu-latest | |
needs: docs | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: "refs/heads/gh-pages" | |
- name: clean-up | |
run: | | |
rm -rf ./* | |
- uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: ./ | |
- name: deploy to gh-pages | |
run: | | |
git config --global user.name ${{ github.actor }} | |
git config --global user.email ${{ github.actor }}@users.noreply.github.com | |
git add . | |
git status | |
git commit --allow-empty -m "YourGameLib automatic docs deployment" | |
git push origin gh-pages |